mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
detect recursion in LuaToString
This commit is contained in:
parent
243e96d503
commit
ae7a63669f
@ -7,6 +7,9 @@
|
||||
#include <sol/sol.hpp>
|
||||
|
||||
static std::string LuaToString(const sol::object Value, size_t Indent = 1) {
|
||||
if (Indent > 80) {
|
||||
return "[[possible recursion, refusing to keep printing]]";
|
||||
}
|
||||
switch (Value.get_type()) {
|
||||
case sol::type::userdata: {
|
||||
std::stringstream ss;
|
||||
|
Loading…
x
Reference in New Issue
Block a user