soulsmods / ModEngine2

Runtime injection library for modding Souls games. WIP
MIT License
864 stars 157 forks source link

get_config crashes for extension #158

Open nex3 opened 10 months ago

nex3 commented 10 months ago

I'm writing an extension for ModEngine2, and I'm trying to add support for loading configuration for it by defining a struct with a from_toml() method and calling ModEngineExtension.from_config() for that struct. When I do this, the entire application immediately crashes. Debugging into it, it looks like ConfigReader.m_relative_path is ending up with length 39 but a null pointer, so when the nested ConfigReader is created the std::filesystem::path copy constructor crashes. Why the original ConfigReader doesn't crash on creation, I'm not sure.