mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix possible segfault from -MT and -MQ
Happened only if `malloc` failed, so...
This commit is contained in:
@@ -432,6 +432,7 @@ int main(int argc, char *argv[])
|
||||
/* On first alloc, make an empty str */
|
||||
tzTargetFileName =
|
||||
malloc(nTargetFileNameLen + 1);
|
||||
if (tzTargetFileName)
|
||||
*tzTargetFileName = '\0';
|
||||
} else {
|
||||
tzTargetFileName =
|
||||
|
||||
Reference in New Issue
Block a user