From bb712cdc28139b8511f29222a2c8cafe8911416c Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:30:06 +0200 Subject: [PATCH] Do it extra safe --- src/mod/server.mod/servmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/server.mod/servmsg.c b/src/mod/server.mod/servmsg.c index e5507af5f..0dfde9e37 100644 --- a/src/mod/server.mod/servmsg.c +++ b/src/mod/server.mod/servmsg.c @@ -414,7 +414,7 @@ static int got001(char *from, char *msg) static void got002(char *from, char *msg) { int i; - for (i = strlen(msg) - 1; (msg[i] != ' ') && (i > 0); i--); + for (i = strlen(msg) - 1; (i > 0) && (msg[i] != ' '); i--); strlcpy(server_version, msg + i + 1, SERVER_VERSION_MAX); }