Skip to content

Commit

Permalink
glcommon: fix logging in glcommon_ext_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi committed Apr 30, 2021
1 parent 123bdf0 commit a41dc26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderer/glcommon/opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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) {
Expand Down

0 comments on commit a41dc26

Please sign in to comment.