diff --git a/src/debugwriter.h b/src/debugwriter.h index 368477b..897b5c3 100644 --- a/src/debugwriter.h +++ b/src/debugwriter.h @@ -72,7 +72,7 @@ public: std::cout << buf.view() << '\n'; #endif #elif __EMSCRIPTEN__ - emscripten_console_log(result.view().c_str()); + emscripten_console_log(buf.view().c_str()); #else std::cout << buf.view() << '\n'; #endif diff --git a/src/main.cpp b/src/main.cpp index e11f907..e199fc1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -301,6 +301,7 @@ int main(int argc, char *argv[]){ SDL_GetWindowSize(win, &winW, &winH); rtData.windowSizeMsg.post(Vec2i(winW, winH)); + /* start modloader */ ModLoader(conf, win); /* Load and post key bindings */ rtData.bindingUpdateMsg.post(loadBindings(conf)); @@ -353,6 +354,5 @@ int main(int argc, char *argv[]){ #ifdef STEAM STEAMSHIM_deinit(); #endif - return 0; } diff --git a/src/security.cpp b/src/security.cpp index daf3f1c..ebbc107 100644 --- a/src/security.cpp +++ b/src/security.cpp @@ -3,7 +3,6 @@ #include "meow.h" #include "debugwriter.h" #include -// this component is needed to protect users from mod attacks. #ifndef __ANDROID__ #ifdef __linux__ @@ -25,44 +24,31 @@ SCMP_SYS(ptrace), SCMP_SYS(process_vm_writev), SCMP_SYS(process_vm_readv), - SCMP_SYS(process_madvise), + SCMP_SYS(process_madvise), SCMP_SYS(pidfd_getfd), SCMP_SYS(kcmp), SCMP_SYS(delete_module), SCMP_SYS(init_module), - SCMP_SYS(init_module), SCMP_SYS(chroot), SCMP_SYS(reboot), - SCMP_SYS(unshare), + SCMP_SYS(unshare), SCMP_SYS(umount2), SCMP_SYS(umount), + SCMP_SYS(mount), SCMP_SYS(setns), SCMP_SYS(sethostname), SCMP_SYS(setdomainname), - SCMP_SYS(bpf), SCMP_SYS(quotactl_fd), - SCMP_SYS(quotactl), + SCMP_SYS(quotactl), SCMP_SYS(move_mount), SCMP_SYS(mount_setattr), - SCMP_SYS(mount), - SCMP_SYS(process_vm_readv), - SCMP_SYS(process_vm_writev), - SCMP_SYS(ptrace), SCMP_SYS(swapon), SCMP_SYS(swapoff), - SCMP_SYS(settimeofday), - SCMP_SYS(sethostname), - SCMP_SYS(umount), - SCMP_SYS(umount2), SCMP_SYS(vm86old), SCMP_SYS(vm86), SCMP_SYS(setgroups), SCMP_SYS(setgid), - SCMP_SYS(setfsuid), - SCMP_SYS(setfsgid), - SCMP_SYS(setdomainname), SCMP_SYS(setns), - SCMP_SYS(unshare), #ifdef __ARM_NR SCMP_SYS(breakpoint), #endif