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
Currently, an expression such as "4random_characters" that I think should be invalid can be happily parsed and executed, resolving into a 4. My initial understanding of how expressions were supposed to work would have lead me to believe this would have returned an error since usually trying to operate on 4random_characters within a script would result in an invalid notation error. Either the documentation isn't clear enough on what is happening behind the scenes or this can be considered an unintentional behaviour.
The logic related to this bug seems to be in line 414 of expression.cpp. I guess we can add a check here, and return ERR_PARSE_ERROR if c is not a whitespace character.
Godot version
v4.1.1.stable.official [bd6af8e]
System information
Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated GeForce RTX 2060 () - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)
Issue description
Currently, an expression such as "4random_characters" that I think should be invalid can be happily parsed and executed, resolving into a 4. My initial understanding of how expressions were supposed to work would have lead me to believe this would have returned an error since usually trying to operate on 4random_characters within a script would result in an invalid notation error. Either the documentation isn't clear enough on what is happening behind the scenes or this can be considered an unintentional behaviour.
Steps to reproduce
Via an editor script
Parsing will return a 0 after successful operation
The execution will return a 4.
Minimal reproduction project
Trivial via an editor script
The text was updated successfully, but these errors were encountered: