Fix constants

This commit is contained in:
Michael Droettboom 2018-09-18 11:09:02 -04:00
parent d0629d4e55
commit 609e1def40
1 changed files with 2 additions and 2 deletions

View File

@ -7,11 +7,11 @@ EM_JS(void, hiwire_setup, (), {
{
var objects = hiwire.objects;
while (hiwire.counter in objects) {
hiwire.counter = (hiwire.counter + 1) & 0x8fffffff;
hiwire.counter = (hiwire.counter + 1) & 0x7fffffff;
}
var idval = hiwire.counter;
objects[idval] = jsval;
hiwire.counter = (hiwire.counter + 1) & 0x8fffffff;
hiwire.counter = (hiwire.counter + 1) & 0x7fffffff;
return idval;
};