diff options
author | daurnimator <quae@daurnimator.com> | 2018-02-28 23:52:06 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-02-28 23:52:38 +1100 |
commit | 79a9c5e4c123da9e58979a61d17557398b0c1be7 (patch) | |
tree | a46a20f61f80b3288499a0d41b5e7dda9af509c9 /src/lstate.js | |
parent | 585b758281c599be61656eb922cb82ca934dc47f (diff) | |
download | fengari-79a9c5e4c123da9e58979a61d17557398b0c1be7.tar.gz fengari-79a9c5e4c123da9e58979a61d17557398b0c1be7.tar.bz2 fengari-79a9c5e4c123da9e58979a61d17557398b0c1be7.zip |
src/lstate.js: Start id at 1; it's better if ids are never falsy
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lstate.js b/src/lstate.js index 0c44f3c..6e623b9 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -79,7 +79,7 @@ class lua_State { class global_State { constructor() { - this.id_counter = 0; /* used to give objects unique ids */ + this.id_counter = 1; /* used to give objects unique ids */ this.ids = new WeakMap(); this.mainthread = null; |