summaryrefslogtreecommitdiffstats
path: root/core/io/resource_format_binary.cpp
diff options
context:
space:
mode:
authormarxin <mliska@suse.cz>2019-02-21 20:57:39 +0100
committermarxin <mliska@suse.cz>2019-02-27 07:45:57 +0100
commite5f665c7187b6934a71169cab5075f899150f17a (patch)
treea42da38f0076409975980452e8264a60d94f747d /core/io/resource_format_binary.cpp
parentce114e35dda4b3f282abb458f8409db2369b279e (diff)
downloadredot-engine-e5f665c7187b6934a71169cab5075f899150f17a.tar.gz
Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r--core/io/resource_format_binary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 6c48942d72..42070cd132 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -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)