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
HashMapMaxLoadSet(HashMap * map, float load)
{
if (!map)
if (!map || (load > 1.0 || load <= 0))
{
return;
}

View file

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