You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, when the method tokenString is called with " and then a string is passed that only contains a single " the input reaches end of stream.
Reaching end of stream being the critical part here. I'm assuming the !== null check is there to catch that. However, for me on both Vivaldi and Firefox (running on Linux), I'm observing that next() returns undefined on end of stream instead of null, so the loop never breaks.
This can be easily reproduced by opening the shader playground website and running the following in the developer console:
newCodeMirror.StringStream('').next()// outputs 'undefined' to the console for me
If this can be reproduced, it should be a simple enough change from !== null to !== undefined. A paranoid fix would be to check for both. If desired, I can make a PR for that.
The text was updated successfully, but these errors were encountered:
Hi! First of all, thanks for this tool :)
I've noticed that with some inputs/configurations, the tab would just hang indefinitely. After shortly debugging, I've tracked it down to this line:
shader-playground/src/ShaderPlayground.Web/wwwroot/js/codemirror-mode-spirv.js
Line 18 in aca8b10
In my case, when the method
tokenString
is called with"
and then a string is passed that only contains a single"
the input reaches end of stream.Reaching end of stream being the critical part here. I'm assuming the
!== null
check is there to catch that. However, for me on both Vivaldi and Firefox (running on Linux), I'm observing thatnext()
returnsundefined
on end of stream instead ofnull
, so the loop never breaks.This can be easily reproduced by opening the shader playground website and running the following in the developer console:
If this can be reproduced, it should be a simple enough change from
!== null
to!== undefined
. A paranoid fix would be to check for both. If desired, I can make a PR for that.The text was updated successfully, but these errors were encountered: