From 7a8ae4b4d72ac8913399f34d0f0b9dff61bcbb29 Mon Sep 17 00:00:00 2001 From: Zeex Date: Sat, 9 Aug 2014 22:29:06 +0700 Subject: [PATCH] Fix compile error when have ':' in stringize string --------- test code -------- static const stock s[]="string"#:x; native print(const s[]); native printf(const s[], ...); main() { print(s); new x = 1; printf("%s", x ? "y" : "n"); } ----- end of test code ----- Fixes #33. --- source/compiler/sc2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/compiler/sc2.c b/source/compiler/sc2.c index 17f5327..a8282a2 100644 --- a/source/compiler/sc2.c +++ b/source/compiler/sc2.c @@ -1829,7 +1829,7 @@ static const unsigned char *unpackedstring(const unsigned char *lptr,int *flags) *flags &= ~STRINGIZE; continue; } else if (*stringize==',' || *stringize==')' || *stringize=='}' || - *stringize==';' || *stringize==':') { /* end */ + *stringize==';') { /* end */ lptr=stringize; break; } else if (*stringize=='\0') { @@ -1903,7 +1903,7 @@ static const unsigned char *packedstring(const unsigned char *lptr,int *flags) *flags &= ~STRINGIZE; continue; } else if (*stringize==',' || *stringize==')' || *stringize=='}' || - *stringize==';' || *stringize==':') { /* end */ + *stringize==';') { /* end */ lptr=stringize; break; } else if (*stringize=='\0') {