From 7a941e5b68ebf8ea4935200beda77499f05df815 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 4 Feb 2022 15:51:25 -0500 Subject: [PATCH] GUI: fix MML string input for negative numbers fixes #124 --- src/gui/gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 3ddac79e8..dc8fcbd64 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -344,8 +344,8 @@ void FurnaceGUI::decodeMMLStr(String& source, int* macro, unsigned char& macroLe case ' ': if (hasVal) { hasVal=false; - negaBuf=false; macro[macroLen]=negaBuf?-buf:buf; + negaBuf=false; if (macro[macroLen]macroMax) macro[macroLen]=macroMax; macroLen++; @@ -362,8 +362,8 @@ void FurnaceGUI::decodeMMLStr(String& source, int* macro, unsigned char& macroLe } if (hasVal && macroLen<128) { hasVal=false; - negaBuf=false; macro[macroLen]=negaBuf?-buf:buf; + negaBuf=false; if (macro[macroLen]macroMax) macro[macroLen]=macroMax; macroLen++;