Skip to content

Commit

Permalink
Handle \f which can sometimes be emitted by python
Browse files Browse the repository at this point in the history
  • Loading branch information
pathorn committed Jul 17, 2012
1 parent 35d0a7c commit 1efafe1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions json_tokener.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,12 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
case 'n':
case 'r':
case 't':
case 'f':
if(c == 'b') printbuf_memappend_fast(tok->pb, "\b", 1);
else if(c == 'n') printbuf_memappend_fast(tok->pb, "\n", 1);
else if(c == 'r') printbuf_memappend_fast(tok->pb, "\r", 1);
else if(c == 't') printbuf_memappend_fast(tok->pb, "\t", 1);
else if(c == 'f') printbuf_memappend_fast(tok->pb, "\f", 1);
state = saved_state;
break;
case 'u':
Expand Down

0 comments on commit 1efafe1

Please sign in to comment.