Merge pull request #52 from Mewtality/master

easy fix for clearAssembly() crashes
This commit is contained in:
BullyWiiPlaza 2022-09-06 12:14:03 +02:00 committed by GitHub
commit 50267fa4f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");
} }