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/ent.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ent.c') diff --git a/src/ent.c b/src/ent.c index 261db25..a1ad08f 100644 --- a/src/ent.c +++ b/src/ent.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 @@ -113,11 +113,11 @@ static inline ctor_func findctor(const struct CEntityFactory *factory, else { if (p[0] == X86_MOVRMW && (p[1] & 0xF8) == 0xC8 && p[2] == X86_CALL) { - return (ctor_func)(p + 7 + mem_loadoffset(p + 3)); + return (ctor_func)(p + 7 + mem_loads32(p + 3)); } if (p[0] == X86_RET || p[0] == X86_RETI16) { if (seencall && --depth) { - p = seencall + 5 + mem_loadoffset(seencall + 1); insns = p; + p = seencall + 5 + mem_loads32(seencall + 1); insns = p; seencall = 0; continue; } -- cgit v1.2.3