Merge pull request #780 from ArtemCmd/main

fix stdlib.lua & events.lua
This commit is contained in:
MihailRis 2026-02-08 19:51:11 +03:00 • committed by GitHub
commit 3637855581
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ function events.emit(event, ...)
for _, func in ipairs(handlers) do
local status, newres = xpcall(func, __vc__error, ...)
if not status then
debug.error("error in event ("..event..") handler: "..newres)
debug.error("error in event ("..event..") handler"..(newres and (": "..tostring(newres)) or ""))
else
result = result or newres
end

View file

@ -259,7 +259,7 @@ function io_stream:read_line()
end
function io_stream:write_line(str)
self:__write(utf8.tobytes(str .. LF))
self:__write(utf8.tobytes(str .. "\n"))
end
function io_stream:read(arg, useTable)

View file

@ -519,7 +519,7 @@ audio.__reset_fetch_buffer = nil
core.get_core_token = audio.input.__get_core_token
local function __vc__process_post_runnables()
if #__post_runnables then
if #__post_runnables > 0 then
for _, func in ipairs(__post_runnables) do
local status, result = xpcall(func, __vc__error)
if not status then