Fix issue in 32 bits mode

This commit is contained in:
Patrick Pelissier committed 2024-05-28 23:31:16 +02:00
1 parent 8e70b6175a
commit 3fd2146bbe
1 file changed
+1 -1
+1 -1
View File
@@ -777,7 +777,7 @@ static void test_rounding(void)
// The final cast to size_t is due to clang which now gives
// warning even if the cast an integer to a bigger size(!)
const size_t max = (size_t) -(m_str1ng_size_t)1;
for(size_t a = max/2; a <= max; a++) {
for(size_t a = max/2; a <= max && a != 0; a++) {
unsigned char m, e;
size_t x = (size_t) a + a/2;
size_t nx = m_str1ng_round_capacity(&m, &e, (m_str1ng_size_t) x);