summaryrefslogtreecommitdiffhomepage
path: root/src/hook.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-03-24 02:06:28 +0000
committerMichael Smith <mikesmiffy128@gmail.com>2022-03-24 04:38:25 +0000
commit00ad7cdd3d05d09a43bda972c823fdc440feabb9 (patch)
tree7f9725341e598f273fc1fb6ca0803c794bb67698 /src/hook.c
parentb18326a75078530df7712667f41b4ea354e1da3e (diff)
Clean up gameinfo_init() and other random stuff
- Just ask the engine for the game directory instead of doing the stupid argv sniffing hacks from the early days of trying to get the damn thing working. - Also add some other path variables, functions and whatnot, and do some other minor tidying up. - Also also, another damn copyright year, somebody please help me. Unfortunate negative effect off this change: con_init() no longer reports the game name, because it has to happen before gameinfo_init(). I've decided I don't really care, though.
Diffstat (limited to 'src/hook.c')
-rw-r--r--src/hook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hook.c b/src/hook.c
index 61cf614..6b9036c 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2021 Michael Smith <mikesmiffy128@gmail.com>
+ * Copyright © 2022 Michael Smith <mikesmiffy128@gmail.com>
* Copyright © 2022 Willian Henrique <wsimanbrazil@yahoo.com.br>
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -97,7 +97,7 @@ void unhook_inline(void *orig) {
int len = p[-1];
int off = mem_load32(p + len + 1);
uchar *q = p + off + 5;
- memcpy(q, p, 5); // XXX not atomic atm! (does any of it even need to be?)
+ memcpy(q, p, 5); // XXX: not atomic atm! (does any of it even need to be?)
FlushInstructionCache(GetCurrentProcess(), q, 5);
}