mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-28 04:20:20 +02:00
fix(util/proto_reader): toString ascii detection
This commit is contained in:
parent
fe95a1bcc6
commit
baf8727912
@ -217,7 +217,7 @@ class ProtoReader(private val buffer: ByteArray) {
|
||||
return@runCatching
|
||||
}
|
||||
//auto detect ascii strings
|
||||
if (array.all { it in 0x20..0x7E }) {
|
||||
if (array.all { it in (0x20..0x7E) || it == 0x0A.toByte() || it == 0x0D.toByte() }) {
|
||||
stringBuilder.append("string: ${array.toString(Charsets.UTF_8)}\n")
|
||||
return@runCatching
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user