summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/crypto/hashing_context.cpp2
-rw-r--r--core/io/file_access_zip.cpp2
-rw-r--r--core/math/geometry.cpp2
-rw-r--r--core/ustring.cpp4
-rw-r--r--core/variant_parser.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/core/crypto/hashing_context.cpp b/core/crypto/hashing_context.cpp
index bdccb258dd..bd863f546b 100644
--- a/core/crypto/hashing_context.cpp
+++ b/core/crypto/hashing_context.cpp
@@ -103,7 +103,7 @@ void HashingContext::_create_ctx(HashType p_type) {
}
void HashingContext::_delete_ctx() {
- return;
+
switch (type) {
case HASH_MD5:
memdelete((CryptoCore::MD5Context *)ctx);
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index be28c9a877..abc0bd064d 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -194,7 +194,7 @@ bool ZipArchive::try_open_pack(const String &p_path) {
packages.push_back(pkg);
int pkg_num = packages.size() - 1;
- for (unsigned int i = 0; i < gi.number_entry; i++) {
+ for (uint64_t i = 0; i < gi.number_entry; i++) {
char filename_inzip[256];
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index f37db90929..77383e2839 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -715,7 +715,7 @@ Vector<Vector<Vector2> > Geometry::decompose_polygon_in_convex(Vector<Point2> po
decomp.write[idx].resize(tp.GetNumPoints());
- for (int i = 0; i < tp.GetNumPoints(); i++) {
+ for (int64_t i = 0; i < tp.GetNumPoints(); i++) {
decomp.write[idx].write[i] = tp.GetPoint(i);
}
diff --git a/core/ustring.cpp b/core/ustring.cpp
index fb4bd6d802..237e86aaf1 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -2147,13 +2147,13 @@ int64_t String::to_int(const CharType *p_str, int p_len) {
if (c >= '0' && c <= '9') {
- if (integer > INT32_MAX / 10) {
+ if (integer > INT64_MAX / 10) {
String number("");
str = p_str;
while (*str && str != limit) {
number += *(str++);
}
- ERR_FAIL_V_MSG(sign == 1 ? INT32_MAX : INT32_MIN, "Cannot represent " + number + " as integer, provided value is " + (sign == 1 ? "too big." : "too small."));
+ ERR_FAIL_V_MSG(sign == 1 ? INT64_MAX : INT64_MIN, "Cannot represent " + number + " as integer, provided value is " + (sign == 1 ? "too big." : "too small."));
}
integer *= 10;
integer += c - '0';
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 07212ec669..fe2c981c3c 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -1522,7 +1522,7 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r
return err;
if (tk.type != TK_STRING) {
r_err_str = "Error reading quoted string";
- return err;
+ return ERR_INVALID_DATA;
}
what = tk.value;