mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
poaque internal_strtod
This commit is contained in:
parent
e1eb037eb6
commit
73b40a0940
4
cJSON.c
4
cJSON.c
@ -187,10 +187,12 @@ static void * CJSON_CDECL internal_realloc(void *pointer, size_t size)
|
||||
{
|
||||
return realloc(pointer, size);
|
||||
}
|
||||
#define internal_strtod strtod
|
||||
#else
|
||||
#define internal_malloc malloc
|
||||
#define internal_free free
|
||||
#define internal_realloc realloc
|
||||
#define internal_strtod strtof
|
||||
#endif
|
||||
|
||||
/* strlen of character literals resolved at compile time */
|
||||
@ -363,7 +365,7 @@ static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_bu
|
||||
loop_end:
|
||||
number_c_string[i] = '\0';
|
||||
|
||||
number = strtod((const char*)number_c_string, (char**)&after_end);
|
||||
number = internal_strtod((const char*)number_c_string, (char**)&after_end);
|
||||
if (number_c_string == after_end)
|
||||
{
|
||||
return false; /* parse_error */
|
||||
|
Loading…
Reference in New Issue
Block a user