From 268e09ecd101cf235fd9056bd1d5ab3d0a3c58fb Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 25 May 2022 23:30:32 +0100 Subject: Fix wonky comparisons in CreateInterface A stupid, stupid bug I'd probably never have caught for years and years. Thanks Evan Lin in the Portal Discord for pointing it out! --- src/sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sst.c') diff --git a/src/sst.c b/src/sst.c index 554cfe5..293a6b4 100644 --- a/src/sst.c +++ b/src/sst.c @@ -484,7 +484,7 @@ static const void *const *const plugin_obj = vtable; EXPORT const void *CreateInterface(const char *name, int *ret) { if (!strncmp(name, "ISERVERPLUGINCALLBACKS00", 24)) { - if ((name[24] >= '1' || name[24] <= '3') && name[25] == '\0') { + if (name[24] >= '1' && name[24] <= '3' && name[25] == '\0') { if (ret) *ret = 0; ifacever = name[24] - '0'; return &plugin_obj; -- cgit v1.2.3