Skip to content
Permalink
Browse files

fixed critical bug where API functions were not returned

  • Loading branch information...
SuperCoder7979 committed Apr 29, 2019
1 parent 0dea015 commit 9e4b32e8f6b5c1e8d117e4cecc2586d4d2f3d8e1
Showing with 3 additions and 0 deletions.
  1. +3 −0 SatisfactoryModLoader/mod/ModFunctions.cpp
@@ -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;
}
}
@@ -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

0 comments on commit 9e4b32e

Please sign in to comment.
You can’t perform that action at this time.