mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 04:05:38 +00:00
Fix possible segfault from -MT and -MQ
Happened only if `malloc` failed, so...
This commit is contained in:
1 parent
30fb6bde5e
commit
de76dcb8fb
1 file changed
+2
-1
+2
-1
@@ -432,7 +432,8 @@ int main(int argc, char *argv[])
|
||||
/* On first alloc, make an empty str */
|
||||
tzTargetFileName =
|
||||
malloc(nTargetFileNameLen + 1);
|
||||
*tzTargetFileName = '\0';
|
||||
if (tzTargetFileName)
|
||||
*tzTargetFileName = '\0';
|
||||
} else {
|
||||
tzTargetFileName =
|
||||
realloc(tzTargetFileName,
|
||||
|
||||
Reference in new issue
Block a user