1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Small fixes to unrechable code, possibly overflows, using NULL pointers

This commit is contained in:
qarmin
2019-06-03 21:52:50 +02:00
parent 8c923fc617
commit 8245db869f
18 changed files with 48 additions and 70 deletions

View File

@@ -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) {