Skip to content

Commit

Permalink
fixed critical bug where API functions were not returned
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskarth committed Apr 29, 2019
1 parent 0dea015 commit 9e4b32e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SatisfactoryModLoader/mod/ModFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ SML_API void registerAPIFunction(std::string name, PVOID func) {
// gets an API function from the mod handler
SML_API PVOID getAPIFunction(std::string name) {
bool found = false;
PVOID func = NULL;
for (Registry reg : modHandler.APIRegistry) {
if (reg.name == name) {
func = reg.func;
found = true;
}
}
Expand All @@ -41,6 +43,7 @@ SML_API PVOID getAPIFunction(std::string name) {
MessageBoxA(NULL, msg.c_str(), "SatisfactoryModLoader Fatal Error", MB_ICONERROR);
abort();
}
return func;
}

// checks if a mod is loaded through mod name
Expand Down

0 comments on commit 9e4b32e

Please sign in to comment.