summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xcb_errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xcb_errors.c b/src/xcb_errors.c
index 2842807..bea940d 100644
--- a/src/xcb_errors.c
+++ b/src/xcb_errors.c
@@ -163,7 +163,7 @@ const char *xcb_errors_get_name_for_minor_code(xcb_errors_context_t *ctx,
while (info && info->major_opcode != major_code)
info = info->next;
- if (info == NULL || minor_code > info->static_info.num_minor)
+ if (info == NULL || minor_code >= info->static_info.num_minor)
return NULL;
return get_strings_entry(info->static_info.strings_minor, minor_code);