From 4b51565e3b4bccb6939ba13ff30838e3c7690801 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Wed, 4 Jan 2006 23:23:52 +0000 Subject: [PATCH] hello my name is pm and i just fixed the bug described in 23888 --- plugins/include/string.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/include/string.inc b/plugins/include/string.inc index aa8d8585..0e024b49 100755 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -127,12 +127,12 @@ native strfind(const string[], const sub[], ignorecase=0, pos=0); /* Compares two strings with the C function strcmp(). Returns 0 on equal. */ native strcmp(const string1[], const string2[], ignorecase=0); -/* Tests if given string contains only digits */ +/* Tests if given string contains only digits. Also, returns false for zero-length strings. */ stock bool:is_str_num(sString[]) { new i = 0; - while (sString[i] && isdigit(sString[i]) + while (sString[i] && isdigit(sString[i])) ++i; return sString[i] == 0 && i != 0;