summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/bg_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/bg_lib.c b/src/game/bg_lib.c
index bb12f286..4f9ee094 100644
--- a/src/game/bg_lib.c
+++ b/src/game/bg_lib.c
@@ -269,7 +269,7 @@ char *strrchr( const char *string, int c )
int i, length = strlen( string );
char *p;
- for( i = length - 1; i >= 0; i-- )
+ for( i = length /*sic*/; i >= 0; i-- )
{
p = (char *)&string[ i ];
@@ -289,7 +289,7 @@ char *strchr( const char *string, int c )
string++;
}
- return (char *)0;
+ return c == '\0' ? (char *)string : (char *)0;
}
char *strstr( const char *string, const char *strCharSet )