diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-10-12 08:38:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-12 08:38:46 +0200 |
| commit | 0fd50ff21777e74258ba5a38e9c32b27cf0784b2 (patch) | |
| tree | f8796d2d0081664e729762194ea194d64f8ce79c /core | |
| parent | 34624068583e472cc69c6864be360821265e764b (diff) | |
| parent | 7e51e4cb84aeb3c191289752e0e6b92facd8f7f6 (diff) | |
Merge pull request #52736 from aaronfranke/lgtm-mult
Fix some LGTM errors of "Multiplication result converted to larger type"
Diffstat (limited to 'core')
| -rw-r--r-- | core/io/file_access_compressed.cpp | 2 | ||||
| -rw-r--r-- | core/io/file_access_zip.cpp | 2 | ||||
| -rw-r--r-- | core/io/zip_io.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index e54c947340..df631053b8 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -233,7 +233,7 @@ uint64_t FileAccessCompressed::get_position() const { if (writing) { return write_pos; } else { - return read_block * block_size + read_pos; + return (uint64_t)read_block * block_size + read_pos; } } diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index b5c882e9ce..53bf7456e6 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -99,7 +99,7 @@ static int godot_testerror(voidpf opaque, voidpf stream) { } static voidpf godot_alloc(voidpf opaque, uInt items, uInt size) { - return memalloc(items * size); + return memalloc((size_t)items * size); } static void godot_free(voidpf opaque, voidpf address) { diff --git a/core/io/zip_io.cpp b/core/io/zip_io.cpp index fb4c76aa7a..24808cc8d6 100644 --- a/core/io/zip_io.cpp +++ b/core/io/zip_io.cpp @@ -100,7 +100,7 @@ int zipio_testerror(voidpf opaque, voidpf stream) { } voidpf zipio_alloc(voidpf opaque, uInt items, uInt size) { - voidpf ptr = memalloc(items * size); + voidpf ptr = memalloc((size_t)items * size); memset(ptr, 0, items * size); return ptr; } |