Fixes TypeLibrary::GetTypeId segfaulting
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2022-02-12 19:02:17 +01:00
parent e1d5a12ce0
commit a03769e9bf
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ void RegisterTypeLibrary::RegisterTypeLibraryType(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("TypeLibrary", 0, asOBJ_REF | asOBJ_NOCOUNT); [[maybe_unused]] int r = engine->RegisterObjectType("TypeLibrary", 0, asOBJ_REF | asOBJ_NOCOUNT);
Ensure(r >= 0); Ensure(r >= 0);
r = engine->RegisterObjectMethod("TypeLibrary", "uint8 GetTypeId(const constString &in name) const", r = engine->RegisterObjectMethod("TypeLibrary", "uint8 GetTypeId(const constString &in name) const",
asFUNCTION(GetTypeId), asCALL_CDECL_OBJLAST); asFUNCTION(GetTypeId), asCALL_CDECL_OBJFIRST);
Ensure(r >= 0); Ensure(r >= 0);
r = engine->RegisterObjectMethod( r = engine->RegisterObjectMethod(
"TypeLibrary", "float GetSingleEffectiveness(uint8 attacking, uint8 defensive) const", "TypeLibrary", "float GetSingleEffectiveness(uint8 attacking, uint8 defensive) const",