]> granicus.if.org Git - nethack/commitdiff
curses decgraphics bit
authorPatR <rankin@nethack.org>
Mon, 14 Oct 2019 09:53:19 +0000 (02:53 -0700)
committerPatR <rankin@nethack.org>
Mon, 14 Oct 2019 09:53:19 +0000 (02:53 -0700)
Array bounds error; thinko rather than typo.

win/curses/cursmisc.c

index aed91e84ca7c53af5567acb9987f5650f26c0823..ba3ff1bc8963eb80d16bcf4c24e52f9543755dd7 100644 (file)
@@ -595,7 +595,7 @@ curses_convert_glyph(boolean decgraphics, int ch, int glyph)
             convindx = ch - 0x5f;
             /* if it's in the lower case block of ASCII (which includes
                a few punctuation characters), use the conversion table */
-            if (convindx >= 0 && convindx <= SIZE(decchars)) {
+            if (convindx >= 0 && convindx < SIZE(decchars)) {
                 ch = decchars[convindx];
                 /* in case ACS_foo maps to 0 when current terminal is unable
                    to handle a particular character; if so, revert to default