mirror of
https://github.com/wiiu-env/AromaBaseModule.git
synced 2024-11-16 08:49:16 +01:00
Replace '/' with '|' in OSDynload_Acquire with name starts with '~'
This commit is contained in:
parent
52e9a80255
commit
5cc25551e5
@ -3,6 +3,7 @@
|
||||
#include "loader_defines.h"
|
||||
#include "logger.h"
|
||||
#include <coreinit/dynload.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <wums.h>
|
||||
|
||||
@ -27,10 +28,20 @@ DECL_FUNCTION(OSDynLoad_Error, OSDynLoad_Acquire, char const *name, OSDynLoad_Mo
|
||||
}
|
||||
}
|
||||
|
||||
OSDynLoad_Error result = real_OSDynLoad_Acquire(name, outModule);
|
||||
if (result == OS_DYNLOAD_OK) {
|
||||
return OS_DYNLOAD_OK;
|
||||
if (name != nullptr && name[0] == '~') {
|
||||
char cpy[64] = {};
|
||||
snprintf(cpy, sizeof(cpy), "%s", name);
|
||||
char *curPtr = &cpy[1];
|
||||
while (*curPtr != '\0') {
|
||||
if (*curPtr == '/') {
|
||||
*curPtr = '|';
|
||||
}
|
||||
curPtr++;
|
||||
}
|
||||
return real_OSDynLoad_Acquire(cpy, outModule);
|
||||
}
|
||||
|
||||
OSDynLoad_Error result = real_OSDynLoad_Acquire(name, outModule);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user