Skip to content

Commit

Permalink
fix iadd length to use byte_length
Browse files Browse the repository at this point in the history
Signed-off-by: martinvuyk <[email protected]>
  • Loading branch information
martinvuyk committed Feb 26, 2025
1 parent f67cc53 commit ffab93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/src/collections/string/string.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ffab93a

Please sign in to comment.