aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compat.h b/src/compat.h
index 0a02174..7049f3d 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -328,7 +328,7 @@ template <typename T>
328{ 328{
329 size_t _len{ 0 }; 329 size_t _len{ 0 };
330 char const* _str{ lua_tolstring(L_, idx_, &_len) }; 330 char const* _str{ lua_tolstring(L_, idx_, &_len) };
331 return std::string_view{ _str, _len }; 331 return _str ? std::string_view{ _str, _len } : "<not a string>";
332} 332}
333 333
334[[nodiscard]] inline std::string_view luaG_checkstring(lua_State* const L_, int const idx_) 334[[nodiscard]] inline std::string_view luaG_checkstring(lua_State* const L_, int const idx_)