diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-05 19:15:47 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-11 15:19:17 +1000 |
commit | 37f3178d33ab77de064bcbf10b4b03ddb47cc979 (patch) | |
tree | 76e3b3ce2d8716577af98e2bbbc4a41021db5107 /source/game/scripting | |
parent | 90db1e0fbadaeb625691d3d0d13f5ae6ef057109 (diff) |
Network compatibility changes
Diffstat (limited to 'source/game/scripting')
-rw-r--r-- | source/game/scripting/StarRootLuaBindings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/scripting/StarRootLuaBindings.cpp b/source/game/scripting/StarRootLuaBindings.cpp index 50d18e8..0ce7866 100644 --- a/source/game/scripting/StarRootLuaBindings.cpp +++ b/source/game/scripting/StarRootLuaBindings.cpp @@ -237,14 +237,14 @@ LuaCallbacks LuaBindings::makeRootCallbacks() { callbacks.registerCallback("getConfigurationPath", [root](String const& path) -> Json { - if (path.beginsWith("title")) + if (path.empty() || path.beginsWith("title")) throw ConfigurationException(strf("cannot get {}", path)); else return root->configuration()->getPath(path); }); callbacks.registerCallback("setConfigurationPath", [root](String const& path, Json const& value) { - if (path.beginsWith("safeScripts")) + if (path.empty() || path.beginsWith("safeScripts")) throw ConfigurationException(strf("cannot set {}", path)); else root->configuration()->setPath(path, value); |