mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 17:05:37 +00:00
Fixes a bug in string splitting that broke the texture selection dialogs in the model editor. They should now populate properly and let you change textures if you want to do a little modding or something of the sort. It also exposed a bug where we had a stack overflow case that was never hit until now. IsValidDirectoryPath() was intended to be calling IsValidDirectoryName() on the consitituent parts of the path, but was calling into itself. The only reason this was never hit in practice is because the bugged Split() function would keep discarding the end character in the strings recursively over the course of execution until the strings were completely empty (oof!). It also turns out that the handler for the indirect texture handling was never hooked up to a slot in the model window. So, not only could the model never have it's indirect texture changed, but would never render it either, since the respective material would never be set. We essentially smoked 3 bugs with a one-liner at the same time.