summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/image_loader.h2
-rw-r--r--core/io/ip_address.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/io/image_loader.h b/core/io/image_loader.h
index 561f275e0c..d95a483c0d 100644
--- a/core/io/image_loader.h
+++ b/core/io/image_loader.h
@@ -71,7 +71,7 @@ public:
class ImageLoader {
enum {
- MAX_LOADERS = 8
+ MAX_LOADERS = 32
};
friend class ResourceFormatLoaderImage;
static ImageFormatLoader *loader[MAX_LOADERS];
diff --git a/core/io/ip_address.cpp b/core/io/ip_address.cpp
index 6d979d10eb..194d1af6bf 100644
--- a/core/io/ip_address.cpp
+++ b/core/io/ip_address.cpp
@@ -184,7 +184,7 @@ bool IP_Address::is_ipv4() const {
}
const uint8_t *IP_Address::get_ipv4() const {
- ERR_FAIL_COND_V(!is_ipv4(), 0);
+ ERR_FAIL_COND_V(!is_ipv4(), &(field8[12])); // Not the correct IPv4 (it's an IPv6), but we don't want to return a null pointer risking an engine crash.
return &(field8[12]);
}