summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jplist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jplist.c b/src/jplist.c
index 978c5f9..45f0544 100644
--- a/src/jplist.c
+++ b/src/jplist.c
@@ -490,7 +490,7 @@ static plist_t parse_primitive(const char* js, jsmntok_info_t* ti, int* index)
if (endp >= str_end) {
/* integer */
val = plist_new_uint((uint64_t)intpart);
- } else if ((*endp == '.' && endp+1 < str_end && isdigit(*(endp+1))) || ((*endp == 'e' || *endp == 'E') && endp < str_end && (isdigit(*(endp+1)) || ((*(endp+1) == '-') && endp+1 < str_end && isdigit(*(endp+2)))))) {
+ } else if ((*endp == '.' && endp+1 < str_end && isdigit(*(endp+1))) || ((*endp == 'e' || *endp == 'E') && endp+1 < str_end && (isdigit(*(endp+1)) || ((*(endp+1) == '-') && endp+2 < str_end && isdigit(*(endp+2)))))) {
/* floating point */
double dval = (double)intpart;
char* fendp = endp;