From ffab93a1554e46194baaab3f654043568cbad6f8 Mon Sep 17 00:00:00 2001 From: martinvuyk Date: Wed, 26 Feb 2025 10:32:43 -0300 Subject: [PATCH] fix iadd length to use byte_length Signed-off-by: martinvuyk --- stdlib/src/collections/string/string.mojo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/src/collections/string/string.mojo b/stdlib/src/collections/string/string.mojo index ff58ea9f05..b7c2b63a78 100644 --- a/stdlib/src/collections/string/string.mojo +++ b/stdlib/src/collections/string/string.mojo @@ -1017,7 +1017,7 @@ struct String( return Self._add(other.as_bytes(), self.as_bytes()) fn _iadd(mut self, other: Span[Byte]): - var o_len = len(other) + var o_len = other.byte_length() if o_len == 0: return self._buffer.reserve(self.byte_length() + o_len + 1)