Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate 9pfs to use TextEncoder to fix 3 byte utf bug #1139

Merged
merged 5 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
get rid of comment on offset, it is necessary
  • Loading branch information
ProgrammerIn-wonderland committed Aug 28, 2024
commit 6811984fa1e437dd0ad7547ede9f445c852ae478
2 changes: 1 addition & 1 deletion lib/marshall.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ marshall.Marshall = function(typelist, input, struct, offset) {
size += stringBytes.byteLength;
length += stringBytes.byteLength;
struct.set(stringBytes, offset);
offset += stringBytes.byteLength; // I'm not sure if this is necessary, I set it here to emulate the exact behavior of the original one
offset += stringBytes.byteLength;

struct[lengthoffset+0] = length & 0xFF;
struct[lengthoffset+1] = (length >> 8) & 0xFF;
Expand Down
Loading