Permalink
Browse files

Fixed a bug where valid integers were not being flagged as such, making

calls like YAJL_IS_INTEGER fail, even though parsing succeeded.
Consisted of removing checks that would have been necessary, if the
custom integer parsing wasn't used.

Signed-off-by: Lloyd Hilaiel <lloyd@hilaiel.com>
  • Loading branch information...
1 parent 150333b commit b0ea41643e411730b8411e282b229d98d5eb38b6 @jcekstrom jcekstrom committed with Jul 7, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/yajl_tree.c
View
@@ -309,11 +309,10 @@ static int handle_number (void *ctx, const char *string, size_t string_length)
v->u.number.flags = 0;
- endptr = NULL;
errno = 0;
v->u.number.i = yajl_parse_integer((const unsigned char *) v->u.number.r,
strlen(v->u.number.r));
- if ((errno == 0) && (endptr != NULL) && (*endptr == 0))
+ if (errno == 0)
v->u.number.flags |= YAJL_NUMBER_INT_VALID;
endptr = NULL;

0 comments on commit b0ea416

Please sign in to comment.