Assert in debug build when opening dialogue that contains non ASCII characters
There is a bug in highlightKeywords in keywordsearch.hpp, to check if a character is the first of a word, we check if previous isAlpha. Except when you have utf8 characters (like in french dialogues) this isn't right, and in debug build it will produce an assert and crash.
- Happens only in OpenMW debug build
- I'm on Windows
- on the latest openMW master
- addons are irrelevant
- But I'm in French, and that is relevant, I guess not many people tested the game in debug using unusual characters.
- To reproduce, use a debug build and open a dialogue that has both keywords and accents or non ASCII characters.
- You'll get an assert.
The reason nobody ever noticed is probably because in release isAlpha probably return false instead of the assert and by luck it doesn't match with anything that it could. I had the crash by opening the dialogue with Sellus Gravius, so the first dialogue box you get in the game.
Edited by Tetramir