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