Make GetRandomNature CInterface be wrapped in a try, as it can throw.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
190157564c
commit
ae0a364504
|
@ -14,8 +14,8 @@ export uint8_t PkmnLib_NatureLibrary_GetNatureByName(NatureLibrary* p, const cha
|
||||||
Try(out = p->GetNatureByName(ArbUt::StringView(name)).GetRaw());
|
Try(out = p->GetNatureByName(ArbUt::StringView(name)).GetRaw());
|
||||||
}
|
}
|
||||||
|
|
||||||
export const char* PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand) {
|
export uint8_t PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand, const char*& out) {
|
||||||
return p->GetRandomNatureName(*rand).c_str();
|
Try(out = p->GetRandomNatureName(*rand).c_str();)
|
||||||
}
|
}
|
||||||
|
|
||||||
export uint8_t PkmnLib_NatureLibrary_GetNatureName(NatureLibrary* p, const Nature* nature, const char*& out) {
|
export uint8_t PkmnLib_NatureLibrary_GetNatureName(NatureLibrary* p, const Nature* nature, const char*& out) {
|
||||||
|
|
Loading…
Reference in New Issue