Open brevven opened 1 week ago
It seems like the easiest way to close this issue would be to just delete the error line, but I'm sure there's a reason that this exists? Maybe b64_encode_str returns an empty string if it fails?
Maybe instead of deleting the line we could only report the error if the input string wasn't empty, or we could even check if the input trying is empty and if so just return an empty output string.
Tested versions
System information
Godot v4.4.dev2.mono - Windows 10.0.22631 - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4070 Ti SUPER (NVIDIA; 32.0.15.6109) - AMD Ryzen 7 7800X3D 8-Core Processor (16 Threads)
Issue description
When encoding the empty string as base64, the resulting base64 string is empty, as is appropriate per RFC4648. However, an error is reported:
Condition "ret.is_empty()" is true. Returning: ret
.An error should not be reported, because an empty return value is appropriate in this case.
Possible location of issue: https://github.com/godotengine/godot/blob/a0cd8f187a43935d756e49bf3778f39f0964f0ac/core/core_bind.cpp#L1234-L1238
Steps to reproduce
_ready()
method)Minimal reproduction project (MRP)
ret_project.zip