diff options
author | 2025-04-09 00:04:21 +0100 | |
---|---|---|
committer | 2025-04-09 00:10:32 +0100 | |
commit | ac876ed2ef1c12f58b3426ffb3cb9d405428c12c (patch) | |
tree | 217b7d206613f9c81b13f7164e79f5c6f32216d7 /src/chatrate.c | |
parent | d4bd451f8893bb01c11fb54451f0243611bf9bfb (diff) | |
download | sst-master.tar.gz sst-master.zip |
Doesn't matter how many history rewrites I do before pushing my local
branch, there will always be something I still got wrong.
Diffstat (limited to 'src/chatrate.c')
-rw-r--r-- | src/chatrate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/chatrate.c b/src/chatrate.c index 54572a5..9538306 100644 --- a/src/chatrate.c +++ b/src/chatrate.c @@ -32,9 +32,9 @@ static uchar *patchedbyte; // So, instead of adding 0.66 to the current time, we subtract it, and that // means we can always chat immediately. -static inline bool find_ratelimit_insn(struct con_cmd *cmd_say) { +static inline bool find_ratelimit_insn(con_cmdcb say_cb) { // Find the add instruction - uchar *insns = (uchar *)cmd_say->cb; + uchar *insns = (uchar *)say_cb; for (uchar *p = insns; p - insns < 128;) { // find FADD if (p[0] == X86_FLTBLK5 && p[1] == X86_MODRM(0, 0, 5)) { @@ -71,8 +71,8 @@ static inline void unpatch_ratelimit_insn() { INIT { struct con_cmd *cmd_say = con_findcmd("say"); - if_cold (!cmd_say) return false; - if (!find_ratelimit_insn(cmd_say)) { + if_cold (!cmd_say) return FEAT_INCOMPAT; // should never happen! + if (!find_ratelimit_insn(cmd_say->cb)) { errmsg_errorx("couldn't find chat rate limit instruction"); return FEAT_INCOMPAT; } |