libtcc: tcc_define_symbol() uses strings, fix segfault
authorRoy <roytam@gmail.com>
Mon, 18 Feb 2013 00:32:03 +0000 (18 08:32 +0800)
committerRoy <roytam@gmail.com>
Mon, 18 Feb 2013 00:32:03 +0000 (18 08:32 +0800)
libtcc.c

index c500e45..1fdee49 100644 (file)
--- a/libtcc.c
+++ b/libtcc.c
@@ -924,7 +924,7 @@ LIBTCCAPI TCCState *tcc_new(void)
     /* standard defines */
     tcc_define_symbol(s, "__STDC__", NULL);
     tcc_define_symbol(s, "__STDC_VERSION__", "199901L");
-    tcc_define_symbol(s, "__STDC_HOSTED__", 1);
+    tcc_define_symbol(s, "__STDC_HOSTED__", "1");
 
     /* target defines */
 #if defined(TCC_TARGET_I386)