diff options
Diffstat (limited to 'src/common/core.c')
-rw-r--r-- | src/common/core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/core.c b/src/common/core.c index 1f361bd95..06ee6b2b8 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -227,9 +227,13 @@ int main (int argc, char **argv) // initialise program arguments
{
- char *p = SERVER_NAME = argv[0];
- while ((p = strchr(p, '/')) != NULL || (p = strchr(p, '\\')) != NULL)
- SERVER_NAME = ++p;
+ char *p1 = SERVER_NAME = argv[0];
+ char *p2 = p1;
+ while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL)
+ {
+ SERVER_NAME = ++p1;
+ p2 = p1;
+ }
arg_c = argc;
arg_v = argv;
#ifndef SVNVERSION
|