Better error messages for memory & swap

This commit is contained in:
Linus Dierheimer
2022-09-20 15:12:24 +02:00
parent ec4bd5d3a2
commit a9cb178315
6 changed files with 65 additions and 14 deletions
+2 -2
View File
@@ -10,9 +10,9 @@
static void printMemory(FFinstance* instance, const char* name, const FFModuleArgs* moduleArgs, const FFMemoryStorage* storage)
{
if(storage->bytesUsed == 0 && storage->bytesTotal == 0)
if(storage->error.length > 0)
{
ffPrintError(instance, name, 0, moduleArgs, "Failed to detect memory");
ffPrintError(instance, name, 0, moduleArgs, "%s", storage->error.chars);
return;
}