Add a null pointer at the end of TimidityArgs

This actually got the execvp call working consistently for me; now I can listen to MIDI music in GZDoom again.
This commit is contained in:
Kevin Caccamo 2017-07-31 10:44:23 -04:00 committed by Rachael Alexanderson
parent a4370a3529
commit 7ff0040f30

View file

@ -558,7 +558,8 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
} }
strCount -= spaceInExePathCount; strCount -= spaceInExePathCount;
char** TimidityArgs = new char*[strCount]; char** TimidityArgs = new char*[strCount + 1];
TimidityArgs[strCount] = NULL;
spaceIdx = CommandLine.IndexOf(' '); spaceIdx = CommandLine.IndexOf(' ');
int curSpace = spaceIdx, i = 1; int curSpace = spaceIdx, i = 1;