actboy168 / YDWE

A Tool to Help the Creation of Warcraft III Map
GNU General Public License v3.0
473 stars 140 forks source link

lua引擎崩溃的bug #207

Open ChrisCatCP opened 3 years ago

ChrisCatCP commented 3 years ago

lua引擎的jassbind.cpp中

        void             push_string(lua_State* L, jass::jstring_t value)
        {
            if (value < 0x10000) {
                value = get_jass_vm()->string_table->get(value);
            }
            lua_pushstring(L, jass::from_trigstring(jass::from_string(value)));
        }

这里判断的小于0x10000有问题 好像是为了兼容 全局变量读取? 索引大于0x10000会导致崩溃

actboy168 commented 3 years ago

忘了