From 375fc2720a064801856a82d6339e05bca466b5d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 10 May 2022 17:04:21 +0200 Subject: [PATCH] :bug: fix char usage --- src/lib/locale.c | 2 +- src/lib/string.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/locale.c b/src/lib/locale.c index 697caad1..f5f76746 100644 --- a/src/lib/locale.c +++ b/src/lib/locale.c @@ -21,7 +21,7 @@ static int basic_note(const char c) { } ANN static m_float basic_locale(m_str str) { - const char base = basic_note(str[0]); + const int base = basic_note(str[0]); if(base == -1) return -1; str++; char *remainder; diff --git a/src/lib/string.c b/src/lib/string.c index 8fc945b7..581d7bc5 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -248,7 +248,7 @@ static MFUN(string_find) { static MFUN(string_findStart) { const m_str base = STRING(o); const size_t sz = strlen(base); - const char pos = *(m_int *)MEM(SZ_INT * 2); + const int pos = *(m_int *)MEM(SZ_INT * 2); if (pos >= 0 && (size_t)pos < sz) { const char arg = *(m_int *)MEM(SZ_INT); char * str = strchr(base + pos, arg); @@ -272,7 +272,7 @@ static MFUN(string_findStr) { static MFUN(string_findStrStart) { const m_str base = STRING(o); const size_t sz = strlen(base); - const char pos = *(m_int *)MEM(SZ_INT * 2); + const int pos = *(m_int *)MEM(SZ_INT * 2); const M_Object obj = *(M_Object *)MEM(SZ_INT); if (pos >= 0 && (size_t)pos < sz) { const m_str arg = STRING(obj); @@ -292,7 +292,7 @@ static MFUN(string_rfind) { static MFUN(string_rfindStart) { const m_str base = STRING(o); const size_t sz = strlen(base); - const char pos = *(m_int *)MEM(SZ_INT); + const int pos = *(m_int *)MEM(SZ_INT); if (pos >= 0 && (size_t)pos < sz) { const char arg = *(m_int *)MEM(SZ_INT * 2); char * str = strrchr(base + pos, arg); -- 2.43.0