some more compiler attributes
make sure all textcode/scan_* routines work if dest or destlen is NULL
This commit is contained in:
@@ -63,11 +63,11 @@ size_t scan_jsonescape(const char *src,char *dest,size_t *destlen) {
|
||||
++written;
|
||||
}
|
||||
done:
|
||||
*destlen=written;
|
||||
if (destlen) *destlen=written;
|
||||
return i;
|
||||
abort:
|
||||
if (prev!=(unsigned int)-1) i-=6; // if we abort and there still was an open surrogate pair, cancel it
|
||||
*destlen=written;
|
||||
if (destlen) *destlen=written;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user