This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
jdk-build-libs
/
json-c
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
11
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Merge pull request
#361
from schwehr/int64
Fix double to int cast overflow in json_object_get_int64.
tags/json-c-0.13-20171207
Eric Haszlakiewicz
GitHub
8 years ago
parent
5454c4eaa3
d9879c2533
commit
dc79d94c38
1 changed files
with
4 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
json_object.c
+ 4
- 0
json_object.c
View File
@@ -688,6 +688,10 @@ int64_t json_object_get_int64(const struct json_object *jso)
case json_type_int:
case json_type_int:
return jso->o.c_int64;
return jso->o.c_int64;
case json_type_double:
case json_type_double:
if (jso->o.c_double >= INT64_MAX)
return INT64_MAX;
if (jso->o.c_double <= INT64_MIN)
return INT64_MIN;
return (int64_t)jso->o.c_double;
return (int64_t)jso->o.c_double;
case json_type_boolean:
case json_type_boolean:
return jso->o.c_boolean;
return jso->o.c_boolean;
Write
Preview
Loading…
Cancel
Save