Browse Source

shaderpipeline: Fix crash in glslang front-end

rdb 5 years ago
parent
commit
e7920aeb91
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/shaderpipeline/shaderCompilerGlslang.cxx

+ 1 - 1
panda/src/shaderpipeline/shaderCompilerGlslang.cxx

@@ -461,7 +461,7 @@ bool ShaderCompilerGlslang::
 check_cg_header(const vector_uchar &code) {
   const char *p = (const char *)&code[0];
   const char *end = p + code.size();
-  while (isspace(*p) && p < end) {
+  while (p < end && isspace(*p)) {
     // Skip leading whitespace.
     ++p;
   }