summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-12 08:38:46 +0200
committerGitHub <noreply@github.com>2021-10-12 08:38:46 +0200
commit0fd50ff21777e74258ba5a38e9c32b27cf0784b2 (patch)
treef8796d2d0081664e729762194ea194d64f8ce79c /modules
parent34624068583e472cc69c6864be360821265e764b (diff)
parent7e51e4cb84aeb3c191289752e0e6b92facd8f7f6 (diff)
Merge pull request #52736 from aaronfranke/lgtm-mult
Fix some LGTM errors of "Multiplication result converted to larger type"
Diffstat (limited to 'modules')
-rw-r--r--modules/hdr/image_loader_hdr.cpp4
-rw-r--r--modules/minimp3/audio_stream_mp3.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp
index 9d6a399eff..32a31aa764 100644
--- a/modules/hdr/image_loader_hdr.cpp
+++ b/modules/hdr/image_loader_hdr.cpp
@@ -65,7 +65,7 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
Vector<uint8_t> imgdata;
- imgdata.resize(height * width * sizeof(uint32_t));
+ imgdata.resize(height * width * (int)sizeof(uint32_t));
{
uint8_t *w = imgdata.ptrw();
@@ -75,7 +75,7 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
if (width < 8 || width >= 32768) {
// Read flat data
- f->get_buffer(ptr, width * height * 4);
+ f->get_buffer(ptr, (uint64_t)width * height * 4);
} else {
// Read RLE-encoded data
diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp
index 7b52ef178a..17ce051b67 100644
--- a/modules/minimp3/audio_stream_mp3.cpp
+++ b/modules/minimp3/audio_stream_mp3.cpp
@@ -112,7 +112,7 @@ void AudioStreamPlaybackMP3::seek(float p_time) {
}
frames_mixed = uint32_t(mp3_stream->sample_rate * p_time);
- mp3dec_ex_seek(mp3d, frames_mixed * mp3_stream->channels);
+ mp3dec_ex_seek(mp3d, (uint64_t)frames_mixed * mp3_stream->channels);
}
AudioStreamPlaybackMP3::~AudioStreamPlaybackMP3() {