|
1 | 1 | #include "libpspexploit.h" |
| 2 | +#include <pspsuspend.h> |
2 | 3 |
|
3 | 4 | static int AddressInRange(u32 addr, u32 lower, u32 higher){ |
4 | 5 | return (addr >= lower && addr < higher); |
@@ -59,7 +60,7 @@ u32 pspXploitFindImportRange(char *libname, u32 nid, u32 lower, u32 higher){ |
59 | 60 | if((stub->libname != libname) && AddressInRange((u32)stub->libname, lower, higher) \ |
60 | 61 | && AddressInRange((u32)stub->nidtable, lower, higher) && AddressInRange((u32)stub->stubtable, lower, higher)) { |
61 | 62 | if(strcmp(libname, stub->libname) == 0) { |
62 | | - u32 *table = stub->nidtable; |
| 63 | + u32 *table =(u32*)stub->nidtable; |
63 | 64 |
|
64 | 65 | int j; |
65 | 66 | for(j = 0; j < stub->stubcount; j++) { |
@@ -220,7 +221,7 @@ static u32 FindSysMemStruct(){ |
220 | 221 | u32 pspXploitFindModuleByName(const char *modulename){ |
221 | 222 | u32 mod = FindSysMemStruct(); |
222 | 223 | while (mod){ |
223 | | - if (strcmp(mod+8, modulename) == 0){ |
| 224 | + if (strcmp((const char *)(mod+8), modulename) == 0){ |
224 | 225 | return mod; |
225 | 226 | } |
226 | 227 | mod = _lw(mod); |
@@ -286,7 +287,7 @@ int pspXploitSetUserLevel(int level) |
286 | 287 | { |
287 | 288 |
|
288 | 289 | static int (*KernelGetUserLevel)() = NULL; |
289 | | - if (!KernelGetUserLevel) KernelGetUserLevel = pspXploitFindFunction("sceThreadManager", "ThreadManForKernel", 0xF6427665); |
| 290 | + if (!KernelGetUserLevel) KernelGetUserLevel =(int(*)()) pspXploitFindFunction("sceThreadManager", "ThreadManForKernel", 0xF6427665); |
290 | 291 |
|
291 | 292 | // Backup User Level |
292 | 293 | int previouslevel = KernelGetUserLevel(); |
|
0 commit comments