MCJack123 / craftos2

A fast, modern, and feature-filled ComputerCraft emulator written in C++.
https://www.craftos-pc.cc
Other
217 stars 25 forks source link

Hardcrash when an error is raised while generating an error #354

Open SReject opened 1 month ago

SReject commented 1 month ago

Describe the bug if an error is raised while error() is preparing to raise, craftos-ps crashes

To Reproduce Save the following script and run it

local crash = setmetatable({}, {
    __tostring = function ()
        -- error: attempt to apply arithmetic operator to string
        return 'abc' + '123';
    end
});
error(crash);

Expected behavior A graceful termination of execution

Environment (please complete the following information):