Mercurial > hg > forks > multipaint-js
diff draw_inputs.pde @ 4:a1261cd4c676
Int-ize byte array index references when using character, e.g. arr['A'] -> arr[int('A')]
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 03 Jul 2018 21:19:29 +0300 |
parents | 5eb3559e1778 |
children | c848a6133cfc |
line wrap: on
line diff
--- a/draw_inputs.pde Tue Jul 03 21:08:55 2018 +0300 +++ b/draw_inputs.pde Tue Jul 03 21:19:29 2018 +0300 @@ -225,7 +225,7 @@ if (g_animx > 63 || g_animy > 63 || g_animx <= 2 || g_animy <= 2) { message("BAD SIZE|See manual"); restoreparameters(); - g_data['n'] = 0; + g_data[int('n')] = 0; return; } int boldsourcex = g_bsourcex; @@ -255,7 +255,7 @@ if (g_animframes <= 0) { message("BAD BOOKEND|See manual"); restoreparameters(); - g_data['n'] = 0; + g_data[int('n')] = 0; g_bsourcex = boldsourcex; g_bsourcey = boldsourcey; g_bsourcex2 = boldsourcex2;