This commit is contained in:
2025-09-13 16:54:33 +02:00
parent aa44716264
commit 164748601e
3 changed files with 58 additions and 21 deletions

View File

@@ -15,13 +15,12 @@ pub mut:
pub fn decoder_new(data []u8) Decoder {
mut e := Decoder{}
e.data = data
// e.data = data.reverse()
return e
}
pub fn (mut d Decoder) get_string() !string {
n := d.get_u16()!
// THIS IS ALWAYS TRYE BECAUSE u16 is max 64KB
// THIS IS ALWAYS TRUE BECAUSE u16 is max 64KB
// if n > 64 * 1024 { // 64KB limit
// return error('string length ${n} exceeds 64KB limit')
// }