mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Merge pull request #1026 from Sierraffinity/master
gbagfx: Check for nullptr for new output path
This commit is contained in:
commit
dc126e3016
@ -552,7 +552,10 @@ int main(int argc, char **argv)
|
||||
FATAL_ERROR("Output file \"%s\" has no extension.\n", outputPath);
|
||||
|
||||
size_t newOutputPathSize = strlen(inputPath) - strlen(inputFileExtension) + strlen(outputFileExtension);
|
||||
outputPath = (char *)malloc(newOutputPathSize);
|
||||
outputPath = malloc(newOutputPathSize);
|
||||
|
||||
if (outputPath == NULL)
|
||||
FATAL_ERROR("Failed to allocate memory for new output path.\n");
|
||||
|
||||
for (int i = 0; i < newOutputPathSize; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user