mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Merge branch 'showmap' into 'master'
Some checks are pending
Build and test / Windows (2019) (push) Blocked by required conditions
Build and test / Windows (2022) (push) Blocked by required conditions
Build and test / Ubuntu (push) Waiting to run
Build and test / MacOS (push) Waiting to run
Build and test / Read .env file and expose it as output (push) Waiting to run
Some checks are pending
Build and test / Windows (2019) (push) Blocked by required conditions
Build and test / Windows (2022) (push) Blocked by required conditions
Build and test / Ubuntu (push) Waiting to run
Build and test / MacOS (push) Waiting to run
Build and test / Read .env file and expose it as output (push) Waiting to run
Require a non-empty argument in ShowMap (#8466) Closes #8466 See merge request OpenMW/openmw!4649
This commit is contained in:
commit
7b47019123
1 changed files with 5 additions and 0 deletions
|
@ -115,6 +115,11 @@ namespace MWScript
|
|||
std::string_view cell = runtime.getStringLiteral(runtime[0].mInteger);
|
||||
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
|
||||
// House as well." http://www.uesp.net/wiki/Tes3Mod:ShowMap
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue