From 06413b3e5944dc1cb00819c1a71c0f7ebba466bd Mon Sep 17 00:00:00 2001 From: neodiX Date: Mon, 14 Oct 2024 20:38:58 +0400 Subject: [PATCH] Manually merging https://github.com/neodix42/ton4j/pull/49. Thanks https://github.com/fynntang ! --- cell/src/main/java/org/ton/java/cell/CellSlice.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cell/src/main/java/org/ton/java/cell/CellSlice.java b/cell/src/main/java/org/ton/java/cell/CellSlice.java index ef2990bb..c00aa2eb 100644 --- a/cell/src/main/java/org/ton/java/cell/CellSlice.java +++ b/cell/src/main/java/org/ton/java/cell/CellSlice.java @@ -3,6 +3,7 @@ import static java.util.Objects.nonNull; import java.math.BigInteger; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.function.Function; @@ -443,9 +444,7 @@ public String loadSnakeString() { BitString bitString = ref.loadBits(ref.bits.getLength()); byte[] uintArray = bitString.toByteArray(); - for (byte value : uintArray) { - s.append((char) value); - } + s.append(new String(uintArray, StandardCharsets.UTF_8)); if (ref.refs.size() > 1) { throw new Error("more than one ref, it is not snake string");