Skip to content

Commit

Permalink
Fix for parsing extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
akb825 committed Nov 14, 2018
1 parent 9227615 commit 7b6abf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions generated/AnyGLHelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ int AnyGL_queryExtension(const char* name)
while (extensions[begin])
{
for (end = begin; extensions[end] && extensions[end] != ' '; ++end)
/* empty */
if (strncmp(extensions + begin, name, end - begin) == 0)
/* empty */;
if (begin != end && strncmp(extensions + begin, name, end - begin) == 0)
return 1;

begin = extensions[end] == ' ' ? end + 1 : end;
Expand Down
4 changes: 2 additions & 2 deletions templates/AnyGLHelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ int AnyGL_queryExtension(const char* name)
while (extensions[begin])
{
for (end = begin; extensions[end] && extensions[end] != ' '; ++end)
/* empty */
if (strncmp(extensions + begin, name, end - begin) == 0)
/* empty */;
if (begin != end && strncmp(extensions + begin, name, end - begin) == 0)
return 1;

begin = extensions[end] == ' ' ? end + 1 : end;
Expand Down

0 comments on commit 7b6abf3

Please sign in to comment.