From 19082e5aa65c7c1ba3bc679393132b8e94f2693b Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 28 Nov 2006 16:26:08 +0000 Subject: - 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 --- src/common/core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/common') 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 -- cgit v1.2.3-70-g09d2