Permalink
Browse files

o more precision?

  • Loading branch information...
1 parent 5853614 commit b0f5f6454f68928d7c46beaf6b87dc7a1c4d928f @gno committed Feb 24, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/yajl_interface.c
View
@@ -130,7 +130,7 @@ int ick_strcmp(const char *a, const char *b, unsigned int blen);
#define FAIL_OUT_OF_RANGE(s,n,d) do { \
char buf[128]; \
- snprintf(buf,128,"%g",d); \
+ snprintf(buf,128,"%99g",d); \
ajv_set_error(s, ajv_e_out_of_range, n, buf,strlen(buf)); \
return 0;} while (0);
@@ -358,7 +358,7 @@ static int ajv_double(void * ctx, double doubleval) {
}
if (found == 0) {
char doublestr[128];
- snprintf(doublestr,128,"%g",doubleval);
+ snprintf(doublestr,128,"%99g",doubleval);
FAIL_NOT_IN_LIST(state,state->node,doublestr,strlen(doublestr));
}
}

0 comments on commit b0f5f64

Please sign in to comment.