From a41dc265bf85f04d31e3d2c2d06eb1c0310f340d Mon Sep 17 00:00:00 2001 From: Andrei Alexeyev Date: Fri, 30 Apr 2021 03:34:36 +0300 Subject: [PATCH] glcommon: fix logging in glcommon_ext_flag --- src/renderer/glcommon/opengl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/glcommon/opengl.c b/src/renderer/glcommon/opengl.c index c362b73240..23d3cdb296 100644 --- a/src/renderer/glcommon/opengl.c +++ b/src/renderer/glcommon/opengl.c @@ -69,17 +69,17 @@ static const char *const ext_vendor_table[] = { attr_nonnull_all static ext_flag_t glcommon_ext_flag(const char *ext) { - assert(ext != NULL); + const char *ext_orig = ext; ext = strchr(ext, '_'); if(ext == NULL) { - log_fatal("Bad extension string: %s", ext); + log_fatal("Bad extension string: %s", ext_orig); } const char *sep = strchr(++ext, '_'); if(sep == NULL) { - log_fatal("Bad extension string: %s", ext); + log_fatal("Bad extension string: %s", ext_orig); } char vendor[sep - ext + 1]; @@ -91,7 +91,7 @@ static ext_flag_t glcommon_ext_flag(const char *ext) { } } - log_fatal("Unknown vendor '%s' in extension string %s", vendor, ext); + log_fatal("Unknown vendor '%s' in extension string %s", vendor, ext_orig); } ext_flag_t glcommon_check_extension(const char *ext) {