... | ... |
@@ -42,8 +42,11 @@ field_quotedstr(char *ptr, char *str, long strsize) |
42 | 42 |
int flaglit; |
43 | 43 |
while(strchr(" \t",*ptr)!=NULL) |
44 | 44 |
ptr++; |
45 |
- if(*ptr!='\"') |
|
45 |
+ if(*ptr!='\"') { |
|
46 |
+ if(str!=NULL && strsize>0) |
|
47 |
+ *str='\0'; |
|
46 | 48 |
return(ptr); |
49 |
+ } |
|
47 | 50 |
/* skip initial '\"' */ |
48 | 51 |
ptr++; |
49 | 52 |
/* read the string unescaping as we go */ |