From 79a9c5e4c123da9e58979a61d17557398b0c1be7 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 28 Feb 2018 23:52:06 +1100 Subject: src/lstate.js: Start id at 1; it's better if ids are never falsy --- src/lstate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2