Skip to content

Commit

Permalink
return string from struct.unpack... for string types
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaranville committed May 2, 2022
1 parent 201d68e commit 8f7f9f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions esm/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ class Struct {
let f = match[2];
let getter = this.getters[f];
let size = this.byte_lengths[f];
var append_target;
if (f == 's') {
output.push(buffer.slice(offset, offset + n));
output.push(new TextDecoder().decode(buffer.slice(offset, offset + n)));
offset += n;
}
else {
Expand Down

0 comments on commit 8f7f9f3

Please sign in to comment.