diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-12 12:49:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 12:49:21 +0200 |
commit | 971b5160c61ccb7a009966d17d339997ea343da3 (patch) | |
tree | ff0d038213821bbf258f9fa9fd36288a7c7d9bbc /editor/audio_stream_preview.cpp | |
parent | f160c81f683d8a523f23d3c4f7a76151a75fe875 (diff) | |
parent | 8245db869f05a86e88338236d22765b87cc71db8 (diff) |
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
Diffstat (limited to 'editor/audio_stream_preview.cpp')
-rw-r--r-- | editor/audio_stream_preview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp index 85db8b77f9..b30b94ab26 100644 --- a/editor/audio_stream_preview.cpp +++ b/editor/audio_stream_preview.cpp @@ -129,7 +129,7 @@ void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) { float max = -1000; float min = 1000; int from = uint64_t(i) * to_read / to_write; - int to = uint64_t(i + 1) * to_read / to_write; + int to = (uint64_t(i) + 1) * to_read / to_write; to = MIN(to, to_read); from = MIN(from, to_read - 1); if (to == from) { |