diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-28 16:26:08 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-28 16:26:08 +0000 |
commit | 19082e5aa65c7c1ba3bc679393132b8e94f2693b (patch) | |
tree | 418a4dbe2a62440d757330a2682e1108d8764be7 /src/common | |
parent | 6a9d17e48f65570c8504e862cfeb8fe3822a59c8 (diff) | |
download | hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.tar.gz hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.tar.bz2 hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.tar.xz hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.zip |
- Fixed a possible crash due to the recent core.c upgrade.
- Changing setting the Guild Master from pc_authok to clif_parse_LoadEndAck so that it will not fail to set the gmaster flag when the first person of a guild to log on is the guild master.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9347 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-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
|