diff --git a/CInterface/Library/NatureLibrary.cpp b/CInterface/Library/NatureLibrary.cpp index 2ca6bbc..bc7b904 100644 --- a/CInterface/Library/NatureLibrary.cpp +++ b/CInterface/Library/NatureLibrary.cpp @@ -14,8 +14,8 @@ export uint8_t PkmnLib_NatureLibrary_GetNatureByName(NatureLibrary* p, const cha Try(out = p->GetNatureByName(ArbUt::StringView(name)).GetRaw()); } -export const char* PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand) { - return p->GetRandomNatureName(*rand).c_str(); +export uint8_t PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand, const char*& out) { + Try(out = p->GetRandomNatureName(*rand).c_str();) } export uint8_t PkmnLib_NatureLibrary_GetNatureName(NatureLibrary* p, const Nature* nature, const char*& out) {