Crash when reading an empty 'manifest.json'.

This commit is contained in:
Christoffer Lerno
2024-09-06 18:05:43 +02:00
parent de13023981
commit 3db7bf5dfd
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
- Deprecated inline generic types.
- Deprecated tuple / triple types.
- Converting a slice to a vector/array would copy too little data.
- Crash when reading an empty 'manifest.json'.
### Stdlib changes
*None yet*

View File

@@ -172,6 +172,10 @@ INLINE JSONObject* read_manifest(const char *lib, const char *manifest_data)
{
error_exit("Error on line %d reading '%s':'%s'", parser.line, lib, parser.error_message);
}
if (!json)
{
error_exit("Empty 'manifest.json' for library '%s'.", lib);
}
return json;
}