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
When doing a format string like so "string % [arg1, arg2]" if you have a variable local to the function that is either equal to "str([something])" or a valid format string with it's arguments in an array ex. "testing %s" % ["stuff"] it will steal the most recent one for the erroring format string.
Small note, it seems to grab the str variable (the stolen one that comes first) without any of the logic applied to it. Ex. "str("stuff and things").uri_encode() gets stolen as just "stuff and things" rather than applying the uri_encode.
Steps to reproduce
Create a function
Add a variable that equals to "str()" or a variable equal to a valid Format String with arguments wrapped in an Array
Set a variable after the above String Variable to a Format String with insufficient arguments with the arguments wrapped in an Array (ex. "stuff %s %s" % ["things"]
Check the second variable, print, breakpoint whatever.
Repro Project Steps:
Run Main Scene
Click Scene (just runs the function
Check output
Repeat with different lines in Format_string_test.test_format uncommented/or commented.
Godot version
v4.2.rc2.official [1ba920f]
System information
Windows 10
Issue description
When doing a format string like so "string % [arg1, arg2]" if you have a variable local to the function that is either equal to "str([something])" or a valid format string with it's arguments in an array ex. "testing %s" % ["stuff"] it will steal the most recent one for the erroring format string.
Small note, it seems to grab the str variable (the stolen one that comes first) without any of the logic applied to it. Ex. "str("stuff and things").uri_encode() gets stolen as just "stuff and things" rather than applying the uri_encode.
Steps to reproduce
Repro Project Steps:
Minimal reproduction project
Format String Access Bug.zip
The text was updated successfully, but these errors were encountered: