Make GetRandomNature CInterface be wrapped in a try, as it can throw.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-19 11:41:39 +02:00
parent 190157564c
commit ae0a364504
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 2 additions and 2 deletions

View File

@ -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) {