From 13857cef34584c99850385529ed7dfae5c915330 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 12 May 2022 22:12:25 +0200 Subject: [PATCH] :bug: Add # and b to locales --- src/lib/locale.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/locale.c b/src/lib/locale.c index f5f76746..6b7afcdc 100644 --- a/src/lib/locale.c +++ b/src/lib/locale.c @@ -21,9 +21,12 @@ static int basic_note(const char c) { } ANN static m_float basic_locale(m_str str) { - const int base = basic_note(str[0]); + int base = basic_note(str[0]); if(base == -1) return -1; str++; + const char mod = *str; + if(mod == '#') { base++; str++; } + else if(mod == 'b') { base--; str++; } char *remainder; const long octave = strtol(str, &remainder, 10); if(*remainder != '\0') return -1; -- 2.43.0