Merge pull request #52 from Mewtality/master
easy fix for clearAssembly() crashes
This commit is contained in:
commit
50267fa4f6
@ -26,15 +26,6 @@ void executeAssembly() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void clearAssembly() {
|
void clearAssembly() {
|
||||||
log_printf("[Clear assembly] Assembly size: %i\n", assemblySize);
|
|
||||||
unsigned char buffer[assemblySize];
|
|
||||||
log_print("[Clear assembly] Buffer allocated\n");
|
|
||||||
memset((void *) buffer, 0, assemblySize);
|
|
||||||
log_print("[Clear assembly] Memory set\n");
|
|
||||||
int startAddress = getStartAddress();
|
|
||||||
log_printf("[Clear assembly] Start address: %i\n", startAddress);
|
|
||||||
kernelCopyData((unsigned char *) startAddress, buffer, assemblySize);
|
|
||||||
log_print("[Clear assembly] Kernel copy done\n");
|
|
||||||
assemblySize = 0;
|
assemblySize = 0;
|
||||||
log_print("[Clear assembly] Assembly size 0\n");
|
log_print("[Clear assembly] Assembly size 0\n");
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user