Fix Compile
This commit is contained in:
parent
e5d1a0578c
commit
7b37b46e9b
@ -68,6 +68,7 @@ void patch(void *start, unsigned char patch[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void patch_address(void *start, void *target) {
|
void patch_address(void *start, void *target) {
|
||||||
unsigned char patch_data[4] = {target & 0xff, (target >> 8) & 0xff, (target >> 16) & 0xff, (target >> 24) & 0xff};
|
uint32_t addr = (uint32_t) target;
|
||||||
|
unsigned char patch_data[4] = {addr & 0xff, (addr >> 8) & 0xff, (addr >> 16) & 0xff, (addr >> 24) & 0xff};
|
||||||
patch(start, patch_data);
|
patch(start, patch_data);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,6 @@ static int has_feature(const char *name) {
|
|||||||
|
|
||||||
// Defined In extra.cpp
|
// Defined In extra.cpp
|
||||||
extern unsigned char *readAssetFile(unsigned char *app_platform, unsigned char *path);
|
extern unsigned char *readAssetFile(unsigned char *app_platform, unsigned char *path);
|
||||||
extern void openTextEdit(unsigned char *local_player, unsigned char *sign);
|
|
||||||
|
|
||||||
// Patch Game Mode
|
// Patch Game Mode
|
||||||
static void set_is_survival(int new_is_survival) {
|
static void set_is_survival(int new_is_survival) {
|
||||||
@ -185,5 +184,5 @@ __attribute__((constructor)) static void init() {
|
|||||||
|
|
||||||
// Change Username
|
// Change Username
|
||||||
const char *username = get_username();
|
const char *username = get_username();
|
||||||
patch_address((void *) 0x18fd4, username);
|
patch_address((void *) 0x18fd4, (void *) username);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user