diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-23 11:07:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-23 11:07:17 +0800 |
commit | 5b9bf7b4a706ceedf70c4da59d5f8b62f053281a (patch) | |
tree | 28b2159a1a5160ec6d30255a988d5822ad8e6c66 /script/service | |
parent | 2ee2233df6d8bfc6c6ed60cb6ab0051a6f41e219 (diff) | |
download | lua-language-server-5b9bf7b4a706ceedf70c4da59d5f8b62f053281a.zip |
should get stack first
Diffstat (limited to 'script/service')
-rw-r--r-- | script/service/service.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/script/service/service.lua b/script/service/service.lua index cd4a9c9a..41c8e7bf 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -146,8 +146,9 @@ function m.startTimer() end function m.testVersion() - local stack = debug.setcstacklimit(201) - if debug.setcstacklimit(stack) == 201 then + local stack = debug.setcstacklimit(200) + debug.setcstacklimit(stack + 1) + if debug.setcstacklimit(stack) == stack + 1 then proto.notify('window/showMessage', { type = 2, message = 'It seems to be running in Lua 5.4.0 or Lua 5.4.1 . Please upgrade to Lua 5.4.2 or above. Otherwise, it may encounter weird "C stack overflow", resulting in failure to work properly', |