Skip to content

Commit eeaf65e

Browse files
aivarasbaranauskasedsiper
authored andcommitted
pack: fix missing scientific notation in JSON parser
Signed-off-by: Aivaras Baranauskas <5412767+aivarasbaranauskas@users.noreply.github.com>
1 parent 58026b2 commit eeaf65e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flb_pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static inline int is_float(const char *buf, int len)
100100
const char *p = buf;
101101

102102
while (p <= end) {
103-
if (*p == 'e' && p < end && *(p + 1) == '-') {
103+
if ((*p == 'e' || *p == 'E') && p < end && (*(p + 1) == '-' || *(p + 1) == '+')) {
104104
return 1;
105105
}
106106
else if (*p == '.') {

0 commit comments

Comments
 (0)