You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
This commit is contained in:
@@ -106,7 +106,7 @@ StringName ResourceInteractiveLoaderBinary::_get_string() {
|
||||
uint32_t id = f->get_32();
|
||||
if (id & 0x80000000) {
|
||||
uint32_t len = id & 0x7FFFFFFF;
|
||||
if (len > str_buf.size()) {
|
||||
if ((int)len > str_buf.size()) {
|
||||
str_buf.resize(len);
|
||||
}
|
||||
if (len == 0)
|
||||
|
||||
Reference in New Issue
Block a user