From cb3c4e23021de6179e9e7005c9b57f7c5ed82702 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 11 Mar 2022 17:00:57 -0500 Subject: [PATCH] GUI: clamp waves to max value --- src/gui/insEdit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index c8eec6763..e653b097f 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -1885,6 +1885,7 @@ void FurnaceGUI::drawWaveEdit() { modified=true; } for (int i=0; ilen; i++) { + if (wave->data[i]>wave->max) wave->data[i]=wave->max; wavePreview[i]=wave->data[i]; } if (wave->len>0) wavePreview[wave->len]=wave->data[wave->len-1];