From 8245db869f05a86e88338236d22765b87cc71db8 Mon Sep 17 00:00:00 2001 From: qarmin Date: Mon, 3 Jun 2019 21:52:50 +0200 Subject: Small fixes to unrechable code, possibly overflows, using NULL pointers --- editor/plugins/editor_preview_plugins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor/plugins/editor_preview_plugins.cpp') diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 28e57ac48a..285823d95a 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -643,7 +643,7 @@ Ref EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S float max = -1000; float min = 1000; int from = uint64_t(i) * frame_length / w; - int to = uint64_t(i + 1) * frame_length / w; + int to = (uint64_t(i) + 1) * frame_length / w; to = MIN(to, frame_length); from = MIN(from, frame_length - 1); if (to == from) { -- cgit v1.2.3