mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Fix pointer of type 'void *' used in arithmetic (cast priority)
This commit is contained in:
parent
a79acfcd24
commit
9d99cb049d
@ -645,7 +645,7 @@ void patch_mkext_v1(LOADER_ENTRY *Entry, UINT8 *drvPtr) {
|
|||||||
UINTN mkext_insert = (UINTN)mkext_ptr + 0x20/*header*/ + mkext_numKexts * 0x20/*kext*/;
|
UINTN mkext_insert = (UINTN)mkext_ptr + 0x20/*header*/ + mkext_numKexts * 0x20/*kext*/;
|
||||||
|
|
||||||
// free some space
|
// free some space
|
||||||
CopyMem((VOID*) mkext_insert + 0x20,
|
CopyMem((VOID*)(mkext_insert + 0x20),
|
||||||
(VOID*) mkext_insert,
|
(VOID*) mkext_insert,
|
||||||
mkext_len - (0x20/*header*/ + mkext_numKexts * 0x20));
|
mkext_len - (0x20/*header*/ + mkext_numKexts * 0x20));
|
||||||
mkext_len += 0x20;
|
mkext_len += 0x20;
|
||||||
@ -660,8 +660,8 @@ void patch_mkext_v1(LOADER_ENTRY *Entry, UINT8 *drvPtr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// copy kext data (plist+binary)
|
// copy kext data (plist+binary)
|
||||||
CopyMem((VOID*) mkext_ptr + mkext_len,
|
CopyMem((VOID*)(mkext_ptr + mkext_len),
|
||||||
(VOID*)(UINTN) KextEntry->kext.paddr + sizeof(_BooterKextFileInfo),
|
(VOID*)(UINTN)(KextEntry->kext.paddr + sizeof(_BooterKextFileInfo)),
|
||||||
(UINT32)((_BooterKextFileInfo*)(UINTN)(KextEntry->kext.paddr))->infoDictLength
|
(UINT32)((_BooterKextFileInfo*)(UINTN)(KextEntry->kext.paddr))->infoDictLength
|
||||||
+ (UINT32)((_BooterKextFileInfo*)(UINTN)(KextEntry->kext.paddr))->executableLength);
|
+ (UINT32)((_BooterKextFileInfo*)(UINTN)(KextEntry->kext.paddr))->executableLength);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user