fix list_tokens(), reallocation of token was terminating the string at 1st char

This commit is contained in:
schippes 2020-08-18 09:39:29 +02:00
parent 2afc4b70a1
commit 57193d3437
1 changed files with 1 additions and 2 deletions

View File

@ -413,7 +413,7 @@ const char *list_tokens(const char *s, int with_quotes)
if(s==NULL) {
my_free(435, &token);
sizetok = 0;
return "";;
return "";
}
sizetok = CADCHUNKALLOC;
my_realloc(451, &token, sizetok);
@ -428,7 +428,6 @@ const char *list_tokens(const char *s, int with_quotes)
if(token_pos>=sizetok) {
sizetok+=CADCHUNKALLOC;
my_realloc(434, &token,sizetok);
token[0] = '\0';
}
if(c=='"') {
if(!escape) quote=!quote;