summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/convbdf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/convbdf.c b/tools/convbdf.c
index c85690a..141b46f 100644
--- a/tools/convbdf.c
+++ b/tools/convbdf.c
@@ -418,7 +418,8 @@ int bdf_read_header(FILE *fp, struct font* pf)
/* calc default char*/
if (pf->defaultchar < 0 ||
pf->defaultchar < firstchar ||
- pf->defaultchar > limit_char )
+ pf->defaultchar > limit_char ||
+ pf->defaultchar > lastchar)
pf->defaultchar = firstchar;
/* calc font size (offset/width entries)*/