mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-08 23:16:39 +00:00
Require a non-empty argument in ShowMap (#8466)
This commit is contained in:
parent
80d6f020ed
commit
58fcc8f66d
1 changed files with 5 additions and 0 deletions
|
|
@ -115,6 +115,11 @@ namespace MWScript
|
||||||
std::string_view cell = runtime.getStringLiteral(runtime[0].mInteger);
|
std::string_view cell = runtime.getStringLiteral(runtime[0].mInteger);
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
|
// In Morrowind, using an empty string either errors out (e.g. console) or kills the game
|
||||||
|
// so it should be reasonable to interrupt the script
|
||||||
|
if (cell.empty())
|
||||||
|
throw std::runtime_error("ShowMap substring must not be empty");
|
||||||
|
|
||||||
// "Will match complete or partial cells, so ShowMap, "Vivec" will show cells Vivec and Vivec, Fred's
|
// "Will match complete or partial cells, so ShowMap, "Vivec" will show cells Vivec and Vivec, Fred's
|
||||||
// House as well." http://www.uesp.net/wiki/Tes3Mod:ShowMap
|
// House as well." http://www.uesp.net/wiki/Tes3Mod:ShowMap
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue