Skip to content

Commit

Permalink
android: fix the issue that string serialization may be incorrect.
Browse files Browse the repository at this point in the history
  • Loading branch information
syalon committed Sep 13, 2020
1 parent e43efbd commit 2d9702f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions android/app/src/main/java/bitshares/BinSerializer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ class BinSerializer {
* 写入字符串(变长,包含长度信息)
*/
fun write_string(value: String): BinSerializer {
val len = value.length
this.write_varint32(len)
if (len > 0) {
_io.write(value.utf8String())
}
write_bytes(value.utf8String(), with_size = true)
return this
}

Expand Down

0 comments on commit 2d9702f

Please sign in to comment.