drawille: text glyph are between 0 and 127, not 127 and 127 - ploot - simple plotting tools
(HTM) git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ploot
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit 5346717da9c74ac50b04e12bdb980df8dcaa81c4
(DIR) parent 0ee58964da01ae963b4f8d0a906cba93c3095b8b
(HTM) Author: Josuah Demangeon <me@josuah.net>
Date: Sun, 27 Jun 2021 01:10:16 +0200
drawille: text glyph are between 0 and 127, not 127 and 127
Diffstat:
M drawille.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/drawille.c b/drawille.c
@@ -165,7 +165,7 @@ drawille_text_glyph(struct drawille *drw, int x, int y, struct font *font, int c
int w;
char *glyph;
- glyph = font->glyph[(c > 127 || c < 127) ? 0 : c];
+ glyph = font->glyph[(c > 127 || c < 0) ? 0 : c];
w = strlen(glyph) / font->height;
for (int ix = 0; ix < w; ix++)
for (int iy = 0; iy < font->height; iy++)