Commit 9944e6a7 authored by Hannes Domani's avatar Hannes Domani Committed by Jean-Baptiste Kempf

contrib: gme: don't skip negative (fixes #14088)

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit e11d1337c0997bea2c6d256845012b47044bf88a)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 505411c5
......@@ -14,6 +14,7 @@ game-music-emu: game-music-emu-$(GME_VERSION).tar.bz2 .sum-gme
$(UNPACK)
$(APPLY) $(SRC)/gme/gme-static.patch
$(APPLY) $(SRC)/gme/gme-quotes.patch
$(APPLY) $(SRC)/gme/skip-underrun.patch
$(MOVE)
.gme: game-music-emu toolchain.cmake
......
--- a/gme/Fir_Resampler.cpp 2013-03-17 02:38:55.000000000 +0100
+++ b/gme/Fir_Resampler.cpp 2015-03-06 14:33:01.061577900 +0100
@@ -188,6 +188,8 @@
{
int remain = write_pos - buf.begin();
int max_count = remain - width_ * stereo;
+ if ( max_count < 0 )
+ return 0;
if ( count > max_count )
count = max_count;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment