From 670488716dde7ba7813dd281f24403a0b24d8690 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 21 Jan 2024 21:59:23 +0000 Subject: Rethink mem_loadoffset, and consequently, kill it Suggested by bill. Having something semantically pointer-sized that's only ever used for stuff that's always 32-bit doesn't really make sense. Note that I intentionally did not add a copyright line for myself in hud.c because, I mean, come on. I'll just say I waive any claim to that tiny trivial change. --- src/democustom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/democustom.c') diff --git a/src/democustom.c b/src/democustom.c index 5dcbe01..4c1baf2 100644 --- a/src/democustom.c +++ b/src/democustom.c @@ -1,5 +1,5 @@ /* - * Copyright © 2023 Michael Smith + * Copyright © 2024 Michael Smith * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -91,7 +91,7 @@ static bool find_WriteMessages(void) { // RecordPacket calls WriteMessages right away, so just look for a call for (const uchar *p = insns; p - insns < 32;) { if (*p == X86_CALL) { - WriteMessages = (WriteMessages_func)(p + 5 + mem_loadoffset(p + 1)); + WriteMessages = (WriteMessages_func)(p + 5 + mem_loads32(p + 1)); return true; } NEXT_INSN(p, "WriteMessages function"); -- cgit v1.2.3