fix sol assert not actually checking the assertion *facepalm*

This commit is contained in:
Lion Kortlepel
2022-12-19 12:41:16 +01:00
parent 59503ccc90
commit 8ea7b75874

View File

@@ -20,8 +20,13 @@
#define SOL_ALL_SAFETIES_ON 1
#define SOL_USER_C_ASSERT SOL_ON
#define SOL_C_ASSERT(...) \
beammp_lua_errorf("SOL2 assertion failure: Assertion `{}` failed in {}:{}. This *should* be a fatal error, but BeamMP Server overrides it to not be fatal. This may cause the Lua Engine to crash, or cause other issues.", #__VA_ARGS__, __FILE__, __LINE__)
#define SOL_C_ASSERT(...) \
do { \
if (!(__VA_ARGS__)) { \
beammp_lua_errorf("SOL2 assertion failure: Assertion `{}` failed in {}:{}. This *should* be a fatal error, but BeamMP Server overrides it to not be fatal. This may cause the Lua Engine to crash, or cause other issues.", #__VA_ARGS__, __FILE__, __LINE__); \
std::abort(); \
} \
} while (0)
#include <sol/sol.hpp>
struct JsonString {