diff --git a/src/mixer.c b/src/mixer.c index a8a48c77c..d26a6f1d3 100644 --- a/src/mixer.c +++ b/src/mixer.c @@ -1051,6 +1051,8 @@ void Mix_ChannelFinished(void (SDLCALL *channel_finished)(int channel)) */ int Mix_ReserveChannels(int num) { + if (num < 0) + num = 0; if (num > num_channels) num = num_channels; reserved_channels = num;