mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcb-errors.git
synced 2026-05-05 00:38:00 +02:00
Correctly ignore extensions without events / errors
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
c4f199fdae
commit
456a9a6f0c
1 changed files with 4 additions and 2 deletions
|
|
@ -153,7 +153,8 @@ const char *xcb_errors_get_name_for_event(xcb_errors_context_t *ctx,
|
|||
{
|
||||
struct extension_info_t *info = ctx->extensions;
|
||||
|
||||
while (info && !IS_IN_RANGE(event_code, info->first_event, info->static_info.num_events))
|
||||
while (info && (info->first_event == 0
|
||||
|| !IS_IN_RANGE(event_code, info->first_event, info->static_info.num_events)))
|
||||
info = info->next;
|
||||
|
||||
if (info == NULL)
|
||||
|
|
@ -167,7 +168,8 @@ const char *xcb_errors_get_name_for_error(xcb_errors_context_t *ctx,
|
|||
{
|
||||
struct extension_info_t *info = ctx->extensions;
|
||||
|
||||
while (info && !IS_IN_RANGE(error_code, info->first_error, info->static_info.num_errors))
|
||||
while (info && (info->first_error == 0
|
||||
|| !IS_IN_RANGE(error_code, info->first_error, info->static_info.num_errors)))
|
||||
info = info->next;
|
||||
|
||||
if (info == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue