evanw / glslx

A GLSL type checker, code formatter, and minifier for WebGL
http://evanw.github.io/glslx/
MIT License
408 stars 28 forks source link

Crash in for loop with conditionals that use variables #17

Closed ryankaplan closed 4 years ago

ryankaplan commented 4 years ago

The following relatively simple shader crashes the compiler for me. Making either start or stop a float literal seems to fix the issue.

export void textureFragment() {
  float start = 1.0;
  float stop = 2.0;
  for (float t = start; t < stop;) { }
}
evanw commented 4 years ago

Thanks for reporting this issue, and sorry for the crash. Should be fixed now. Let me know if you are still experiencing issues.

ryankaplan commented 4 years ago

Thaaaaanks!! :)