summaryrefslogtreecommitdiffstats
path: root/src/jplist.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-09-05 01:31:45 +0200
committerGravatar Nikias Bassen2022-09-05 01:31:45 +0200
commitb24911fd4f5f772c9dc242ffab133806ab2cbab9 (patch)
treef66936db399370dbe2dd618ab3131fb04414d50c /src/jplist.c
parenteeb22f94307a2c3f5f54275deb8d270b683df216 (diff)
downloadlibplist-b24911fd4f5f772c9dc242ffab133806ab2cbab9.tar.gz
libplist-b24911fd4f5f772c9dc242ffab133806ab2cbab9.tar.bz2
jplist: Fix warning with `-Wbad-function-cast`
Diffstat (limited to 'src/jplist.c')
-rw-r--r--src/jplist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jplist.c b/src/jplist.c
index 6a44f8c..e615299 100644
--- a/src/jplist.c
+++ b/src/jplist.c
@@ -523,8 +523,8 @@ static plist_t parse_primitive(const char* js, jsmntok_info_t* ti, int* index)
break;
}
if (fendp+1 < str_end && (*fendp == 'e' || *fendp == 'E') && (isdigit(*(fendp+1)) || ((*(fendp+1) == '-') && fendp+2 < str_end && isdigit(*(fendp+2))))) {
- double exp = (double)parse_decimal(fendp+1, str_end, &fendp);
- dval = dval * pow(10, exp);
+ int64_t exp = parse_decimal(fendp+1, str_end, &fendp);
+ dval = dval * pow(10, (double)exp);
} else {
PLIST_JSON_ERR("%s: invalid character at offset %d when parsing floating point value\n", __func__, (int)(fendp - js));
err++;