Skip to content

Commit

Permalink
Whoops, dropped last extension from the list in legacy GL extension c…
Browse files Browse the repository at this point in the history
…odepath.
  • Loading branch information
icculus committed Oct 11, 2012
1 parent dee3418 commit ebb8431
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions mojoshader_opengl.c
Expand Up @@ -1117,20 +1117,24 @@ static void load_extensions(MOJOSHADER_glGetProcAddress lookup, void *d)
while (1)
{
const char ch = *str;
if (ch == '\0')
break;
else if (!iswhitespace(ch))
if (ch && (!iswhitespace(ch)))
{
str++;
continue;
} // else if

if (!stringcache_len(exts, ext, (unsigned int) (str - ext)))
if (str != ext)
{
out_of_memory();
break;
if (!stringcache_len(exts, ext, (unsigned int) (str - ext)))
{
out_of_memory();
break;
} // if
} // if

if (ch == '\0')
break;

str++;
while (*str && iswhitespace(*str))
str++;
Expand Down

0 comments on commit ebb8431

Please sign in to comment.