summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2015-03-18 22:00:04 +0100
committerUli Schlachter <psychon@znc.in>2015-03-18 22:00:04 +0100
commit6d842936999b3f31f452b598347cd8f402c5f87d (patch)
treef08bb9021d6e4e4a6c95cd9ee9ccbba8d87d8394 /src
parent68cf24822c354be1e960ad9198cd187eba122e06 (diff)
Fix off-by-one in length check
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src')
-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);