diff --git a/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp b/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp index be13bd535..a2344d953 100644 --- a/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp +++ b/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp @@ -645,6 +645,10 @@ namespace FEX::EmulatedFile { // Finish off with a null terminator fwrite("\0", sizeof(uint8_t), 1, fp); } + + // One additional null terminator to finish the list + fwrite("\0", sizeof(uint8_t), 1, fp); + fseek(fp, 0, SEEK_SET); int32_t f = fileno(fp); return f;