mirror of
https://github.com/rafagafe/tiny-json.git
synced 2024-11-17 11:35:30 +00:00
Allow escape/special character in string
Consider the case of PEM certificate. This modification give it a chance to scan over those escape characters. e.g.: '\t': 0x09 '\n': 0x0A Signed-off-by: Alamy Liu <alamy.liu@gmail.com>
This commit is contained in:
parent
fdb66f1037
commit
6d3025be56
@ -130,7 +130,7 @@ static unsigned char getCharFromUnicode( unsigned char const* str ) {
|
||||
static char* parseString( char* str ) {
|
||||
unsigned char* head = (unsigned char*)str;
|
||||
unsigned char* tail = (unsigned char*)str;
|
||||
for( ; *head >= ' '; ++head, ++tail ) {
|
||||
for( ; *head; ++head, ++tail ) {
|
||||
if ( *head == '\"' ) {
|
||||
*tail = '\0';
|
||||
return (char*)++head;
|
||||
|
Loading…
Reference in New Issue
Block a user