diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2023-06-10 16:44:19 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2023-06-10 16:51:02 +0100 |
commit | 1c4318331663b152b0b298bd2c9e5c971506a86b (patch) | |
tree | a402681cb84b491819ba5018525c16340110fd4d /src/democustom.c | |
parent | 602a18977d500ad068fd63fbedcafb630c29ee72 (diff) |
Prune some comments and tidy up other minor things
Diffstat (limited to 'src/democustom.c')
-rw-r--r-- | src/democustom.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/democustom.c b/src/democustom.c index c2c6ae1..0ecbaa3 100644 --- a/src/democustom.c +++ b/src/democustom.c @@ -76,11 +76,8 @@ void democustom_write(const void *buf, int len) { bitbuf_reset(&bb); } -// This finds the CDemoRecorder::WriteMessages() function, which takes a raw -// network packet, wraps it up in the appropriate demo framing format and writes -// it out to the demo file being recorded. static bool find_WriteMessages(void) { - // TODO(compat): probably rewrite this to just scan for a call instruction! + // TODO(compat): rewrite this to just scan for a call instruction! const uchar *insns = (*(uchar ***)demorecorder)[vtidx_RecordPacket]; // RecordPacket calls WriteMessages pretty much right away: // 56 push esi @@ -101,8 +98,6 @@ static bool find_WriteMessages(void) { #endif if (!memcmp(insns, bytes, sizeof(bytes))) { ssize off = mem_loadoffset(insns + sizeof(bytes)); - // ... and then offset is relative to the address of whatever is _after_ - // the call instruction... because x86. WriteMessages = (WriteMessages_func)(insns + sizeof(bytes) + 4 + off); return true; } |