Browse Source

use utilCStrMatch to compare strings instead of strstr

remotes/bxxa/master
cinnaboot 4 years ago
parent
commit
59cc44cddb
  1. 4
      src/shader.cpp

4
src/shader.cpp

@ -627,11 +627,11 @@ ctxGetUniformBlockBinding(GLContext* gl_ctx, const char* name)
for (u32 i = 0; i < gl_ctx->num_ubos; i++) { for (u32 i = 0; i < gl_ctx->num_ubos; i++) {
GLBuffer& ubo = gl_ctx->uniform_buffers[i]; GLBuffer& ubo = gl_ctx->uniform_buffers[i];
if (std::strstr(ubo.name, name)) if (utilCStrMatch(ubo.name, name))
return ubo.binding_idx; return ubo.binding_idx;
} }
LOGF(Error, "no buffer found with name: %s\n", name); LOGF(Error, "no buffer found with name: '%s'\n", name);
return -1; return -1;
} }

Loading…
Cancel
Save