Skip to content

Commit

Permalink
Update decode.v
Browse files Browse the repository at this point in the history
Co-authored-by: Delyan Angelov <[email protected]>
  • Loading branch information
enghitalo and spytheman authored Dec 4, 2023
1 parent e1f132b commit a53499e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion decode.v
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ pub fn (mut d Decoder) decode_to_json_using_fixed_buffer[T, F](src []u8, mut fix
// REVIEW - why it is slow??
str_len := d.read_str_len(data) or { return error('error reading string length') }

for letter in data[d.pos..d.pos + str_len] {
for i := d.pos; i < d.pos + str_len; i++ {
letter := data[i]
fixed_buf[d.char_count] = letter
d.char_count++
}
Expand Down

0 comments on commit a53499e

Please sign in to comment.