summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2015-11-17 00:23:51 +0100
committerMarkus Teich <markus.teich@stusta.mhn.de>2015-11-17 00:23:51 +0100
commitb1cb3bbc2085bc30e0a456d02e7eb68d5665a5b2 (patch)
treed188ef6f3855ce86227b848c30df935aace6f4d7
parent84734c73e82b8b30e2eef82c192a53010fb2d35f (diff)
downloadsent-b1cb3bbc2085bc30e0a456d02e7eb68d5665a5b2.tar.gz
sent-b1cb3bbc2085bc30e0a456d02e7eb68d5665a5b2.tar.bz2
sent-b1cb3bbc2085bc30e0a456d02e7eb68d5665a5b2.zip
fix another index overflow issue
-rw-r--r--sent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sent.c b/sent.c
index 6fd288b..5e47815 100644
--- a/sent.c
+++ b/sent.c
@@ -326,7 +326,8 @@ void getfontsize(Slide *s, unsigned int *width, unsigned int *height)
for (j = NUMFONTSCALES - 1; j >= 0; j--)
if (fonts[j]->h * lfac <= xw.uh)
break;
- drw_setfontset(d, fonts[++j]);
+ LIMIT(j, 0, NUMFONTSCALES - 1);
+ drw_setfontset(d, fonts[j]);
/* fit width */
*width = 0;
Software created with 💖