Fixed array overflow causing segfault, fixes #17

Should also solve issue #16
Thanks to ps-auxw @ IRC for finding this stupid bug!
This commit is contained in:
Marko Viitanen 2014-02-10 19:40:43 +02:00
parent 75f3ba5b2f
commit 4bd6131499

View file

@ -183,7 +183,7 @@ void init_tables(void)
memset( g_convert_to_bit,-1, sizeof( g_convert_to_bit ) ); memset( g_convert_to_bit,-1, sizeof( g_convert_to_bit ) );
for (i = 4; i < (1 << 7); i *= 2) { for (i = 4; i < LCU_WIDTH; i *= 2) {
g_convert_to_bit[i] = (int8_t)c; g_convert_to_bit[i] = (int8_t)c;
c++; c++;
} }