diff options
author | 2025-08-02 14:43:19 +0100 | |
---|---|---|
committer | 2025-08-02 14:43:19 +0100 | |
commit | 0d905d7998a031c2d7a1cdc5d0d1148b55b610a2 (patch) | |
tree | ea73c7cadd583a8c95b4a7ba6edaa10e99067098 /src/ent.c | |
parent | f2f9f18a893527ee80260a2d57bca3023f8fd44f (diff) | |
download | sst-0d905d7998a031c2d7a1cdc5d0d1148b55b610a2.tar.gz sst-0d905d7998a031c2d7a1cdc5d0d1148b55b610a2.zip |
Make additional use of untyped command callbacks
Diffstat (limited to 'src/ent.c')
-rw-r--r-- | src/ent.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -71,8 +71,7 @@ struct CEntityFactoryDictionary { #ifdef _WIN32 // TODO(linux): this'll be different too, leaving out for now static struct CEntityFactoryDictionary *entfactorydict = 0; -static inline bool find_entfactorydict(con_cmdcb dumpentityfactories_cb) { - const uchar *insns = (const uchar *)dumpentityfactories_cb; +static inline bool find_entfactorydict(const uchar *insns) { for (const uchar *p = insns; p - insns < 64;) { // EntityFactoryDictionary() is inlined, and returns a static, which is // lazy-inited (trivia: this was old MSVC, so it's not thread-safe like @@ -172,7 +171,7 @@ INIT { #ifdef _WIN32 // TODO(linux): above struct con_cmd *dumpentityfactories = con_findcmd("dumpentityfactories"); if_cold (!dumpentityfactories || - !find_entfactorydict(dumpentityfactories->cb)) { + !find_entfactorydict(dumpentityfactories->cb_insns)) { errmsg_warnx("server entity factories unavailable"); } #endif |