summaryrefslogtreecommitdiff
path: root/games-arcade/kobodeluxe/files
diff options
context:
space:
mode:
Diffstat (limited to 'games-arcade/kobodeluxe/files')
-rw-r--r--games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-midi-crash-fix.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-midi-crash-fix.patch b/games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-midi-crash-fix.patch
new file mode 100644
index 000000000000..0b0fd10d9b08
--- /dev/null
+++ b/games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-midi-crash-fix.patch
@@ -0,0 +1,13 @@
+diff -up KoboDeluxe-0.5.1/sound/a_midicon.c~ KoboDeluxe-0.5.1/sound/a_midicon.c
+--- KoboDeluxe-0.5.1/sound/a_midicon.c~ 2015-06-03 20:31:31.000000000 +0200
++++ KoboDeluxe-0.5.1/sound/a_midicon.c 2015-06-03 20:47:40.836311461 +0200
+@@ -120,7 +120,8 @@ static inline void __press(unsigned ch,
+ {
+ m[ch].next[key] = -1;
+ m[ch].prev[key] = m[ch].last;
+- m[ch].next[m[ch].last] = (char)key;
++ if (m[ch].last != -1)
++ m[ch].next[m[ch].last] = (char)key;
+ m[ch].last = (char)key;
+ }
+