diff --git a/m-string.h b/m-string.h index c306a986..e3ed8acf 100644 --- a/m-string.h +++ b/m-string.h @@ -1842,6 +1842,7 @@ m_string_previous(m_string_it_t it) bool b = m_string_end_p(it); M_ASSERT(!b); (void) b; + return; } } /* We reach the start of the string: mark the iterator to the end */ diff --git a/tests/test-mstring.c b/tests/test-mstring.c index 7b28844d..0b08e8a8 100644 --- a/tests/test-mstring.c +++ b/tests/test-mstring.c @@ -119,6 +119,7 @@ static void test_utf8_it(void) i--; assert (string_get_cref(it) == tab[i]); } + assert(i == 0); string_set_str (s, "H€llo René Chaînôr¬"); assert(string_length_u(s) == 19);