Skip to content

Commit

Permalink
avoid divided by zero on windows cygwin gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Nov 29, 2021
1 parent ef57f4b commit 5c13f4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mcx_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ int mcx_loadjson(cJSON *root, Config *cfg){
cfg->srcdir.z=subitem->child->next->next->valuedouble;
if(subitem->child->next->next->next){
if(cJSON_IsString(subitem->child->next->next->next) && strcmp(subitem->child->next->next->next->valuestring,"_NaN_")==0)
cfg->srcdir.w=-(0.0 / 0.0);
cfg->srcdir.w=NAN;
else
cfg->srcdir.w=subitem->child->next->next->next->valuedouble;
}
Expand Down

0 comments on commit 5c13f4b

Please sign in to comment.