Jacek Caban (@jacek) commented about dlls/opengl32/unix_wgl.c:
- } - assert( count + ARRAYSIZE(legacy_extensions) - 1 == size ); + const char *str, *ptr; + char *out; + + if (!(str = (const char *)funcs->p_glGetString( GL_EXTENSIONS ))) str = ""; + + for (ptr = str; *ptr; ptr++) if (*ptr == ' ') size++; + if (ptr != str && ptr[-1] != ' ') size++; + + if (!(extensions = malloc( size * sizeof(*extensions) + (ptr - str) ))) return; + out = (char *)&extensions[size]; + memcpy( out, str, ptr - str ); + + for (ptr = strtok( out, " " ); ptr && *ptr; ptr = strtok( NULL, " " )) extensions[count++] = ptr; + assert( count + ARRAY_SIZE(legacy_extensions) - 1 == size ); This assert fails in opengl tests if I hack the branch to be taken regardless of GL version (works fine otherwise).
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9362#note_120822