Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

jsonparser: Fix some issues with leading spaces

  • Loading branch information...
commit ebc5d25c00a988f33375d46ce9bdaf45dac9478a 1 parent 0069f40
@andoma andoma authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/misc/json.c
View
5 src/misc/json.c
@@ -279,6 +279,9 @@ static const char *
json_parse_double(const char *s, double *dp)
{
const char *ep;
+ while(*s > 0 && *s < 33)
+ s++;
+
double d = my_str2double(s, &ep);
if(ep == s)
@@ -296,6 +299,8 @@ static char *
json_parse_integer(const char *s, long *lp)
{
char *ep;
+ while(*s > 0 && *s < 33)
+ s++;
const char *s2 = s;
while(*s2 >= '0' && *s2 <= '9')
s2++;

0 comments on commit ebc5d25

Please sign in to comment.
Something went wrong with that request. Please try again.