mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-30 14:25:36 +08:00
Update base.cpp
This commit is contained in:
parent
04d376ce25
commit
dbc4e7e08b
@ -158,17 +158,17 @@ std::string get_lib_path() {
|
||||
int i = 0;
|
||||
struct dirent *ep;
|
||||
dp = opendir (dir.c_str());
|
||||
intptr_t p = (intptr_t)&get_lib_path;
|
||||
uintptr_t p = (uintptr_t)&get_lib_path;
|
||||
|
||||
if (dp != NULL)
|
||||
{
|
||||
while ((ep = readdir (dp))) {
|
||||
if (memcmp(ep->d_name, ".", 2) != 0 && memcmp(ep->d_name, "..", 3) != 0) {
|
||||
char *upper = NULL;
|
||||
intptr_t lower_bound = strtoull(ep->d_name, &upper, 16);
|
||||
uintptr_t lower_bound = strtoull(ep->d_name, &upper, 16);
|
||||
if (lower_bound) {
|
||||
++upper;
|
||||
intptr_t upper_bound = strtoull(upper, &upper, 16);
|
||||
uintptr_t upper_bound = strtoull(upper, &upper, 16);
|
||||
if (upper_bound && (lower_bound < p && p < upper_bound)) {
|
||||
std::string path = dir + PATH_SEPARATOR + ep->d_name;
|
||||
char link[PATH_MAX] = {};
|
||||
|
Loading…
Reference in New Issue
Block a user