blob: 0b0fd10d9b08c1ca5728e2e5d80026bf949ee17b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
}
|