Fix compile error with arrays of packed strings
This fixes the "possibly non-terminated string" error when declaring an array of packed strings (unpacked strings worked OK). Test code: new x[][] = { !"hello", !"world" }; main() { printf("%s", x[0]); }
This commit is contained in:
parent
99df013361
commit
d9999d4da8
@ -1868,7 +1868,7 @@ static const unsigned char *packedstring(const unsigned char *lptr,int *flags)
|
|||||||
else
|
else
|
||||||
litadd(0); /* add full cell of zeros */
|
litadd(0); /* add full cell of zeros */
|
||||||
|
|
||||||
if (*lptr==',' || *lptr==')' || *lptr=='}' || *lptr==';')
|
if (*lptr==',' || *lptr==')' || *lptr=='}' || *lptr==';' || *lptr=='\n' || *lptr=='\r')
|
||||||
lptr=stringize; /* backtrack to end of last string for closing " */
|
lptr=stringize; /* backtrack to end of last string for closing " */
|
||||||
return lptr;
|
return lptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user