Fix some invalid structures.

This commit is contained in:
Jordan Bancino 2022-07-29 12:32:46 -04:00
parent 787a891cb8
commit 1087069416
2 changed files with 4 additions and 4 deletions

View file

@ -272,7 +272,7 @@ HashMapIterate(HashMap * map, char **key, void **value)
void void
HashMapMaxLoadSet(HashMap * map, float load) HashMapMaxLoadSet(HashMap * map, float load)
{ {
if (!map) if (!map || (load > 1.0 || load <= 0))
{ {
return; return;
} }

View file

@ -287,9 +287,9 @@ JsonValueFree(JsonValue * value)
} }
ArrayFree(arr); ArrayFree(arr);
break; break;
case JSON_STRING: case JSON_STRING:
free(value->as.string); free(value->as.string);
break; break;
default: default:
break; break;
} }