Skip to content

Validate INFO filters when loading the record

Evil Eye requested to merge Assumeru/openmw:filterview into master

This prevents hard to diagnose errors caused by invalid content files.

Specifically this in progress TR claim which contains a Not Local filter without a local variable name. MWDialogue::SelectWrapper::getName throws an exception due to the out of bounds substr call. It'd be trivial to do a bounds check and return an empty string in this case, but other parts of the dialogue filtering code can also throw exceptions when they encounter invalid data, so it seems more useful to diagnose and fix the problem on load much like we do with NPCs that have missing factions and such. Morrowind.exe reportedly handles the file in question gracefully.

I also removed some redundant case smashing by adding SelectWrapper::getCellName and SelectWrapper::getId.

Merge request reports