summaryrefslogtreecommitdiff
path: root/libyelp
diff options
context:
space:
mode:
Diffstat (limited to 'libyelp')
-rw-r--r--libyelp/yelp-man-parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libyelp/yelp-man-parser.c b/libyelp/yelp-man-parser.c
index 8d097820..00e66e00 100644
--- a/libyelp/yelp-man-parser.c
+++ b/libyelp/yelp-man-parser.c
@@ -463,7 +463,7 @@ yelp_man_parser_free (YelpManParser *parser)
static void
set_font_register (YelpManParser *parser, guint k, const gchar* name)
{
- if (k > MAN_FONTS) {
+ if (k >= MAN_FONTS) {
g_warning ("Tried to set nonexistant font register %u to %s",
k, name);
return;
@@ -476,7 +476,7 @@ static const gchar*
get_font (const YelpManParser *parser)
{
guint k = parser->current_font;
- if (k > MAN_FONTS ||
+ if (k >= MAN_FONTS ||
parser->font_registers[k] == NULL) {
g_warning ("Tried to get nonexistant font register %u", k);