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

Wrong output is returned, when keys use all bytes. #17

Open
wistoft opened this issue Oct 19, 2022 · 0 comments · May be fixed by #18
Open

Wrong output is returned, when keys use all bytes. #17

wistoft opened this issue Oct 19, 2022 · 0 comments · May be fixed by #18

Comments

@wistoft
Copy link

wistoft commented Oct 19, 2022

Hej

I've found a case, where wrong output is returned.

const SharedMap = require("sharedmap");

const map = new SharedMap(4, 4, 4);

map.set("var0", "123");
map.set("var1", "123");

if ("123" !== map.get("var0")) {
  console.log("Got wrong output: " + map.get("var0"));
}

I've isolated the problem to missing space for zero bytes in keysData and valuesData.

And I've made PR for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant