From: Jérémie Astor Date: Tue, 10 May 2022 15:04:21 +0000 (+0200) Subject: :bug: fix char usage X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=375fc2720a064801856a82d6339e05bca466b5d1;p=gwion.git :bug: fix char usage --- 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);