Skip to content

Commit

Permalink
Fix Issue segfault #2 .
Browse files Browse the repository at this point in the history
  • Loading branch information
gzaffin committed Oct 8, 2023
1 parent 02a5b6a commit a45c3f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eupplayer_townsEmulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,15 +1355,15 @@ void EUP_TownsEmulator::nextTick()
}
#endif // _MSC_VER
#if defined ( __MINGW32__ )
int *buf0 = new int[buflen];
int *buf0 = new int[buflen * _outputSampleChannels];
if (nullptr == buf0) {
fprintf(stderr, "heap allocation problem.\n");
fflush(stderr);
exit(0);
}
#endif // __MINGW32__
#if defined ( __GNUC__ ) && !defined ( __MINGW32__ )
int buf0[buflen];
int buf0[buflen * _outputSampleChannels];
#endif // __GNUC__

memset(buf0, 0, sizeof(buf0[0]) * buflen * _outputSampleChannels);
Expand Down

0 comments on commit a45c3f2

Please sign in to comment.