summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-09-21 01:23:03 -0300
committershennetsind <ind@henn.et>2014-09-21 01:23:03 -0300
commite2ab0ffb71a44ff2a5b675e988e78137a00e183f (patch)
tree15bd61fd03e6429fa18a8bf63fa0a8b0323cd46c /src
parentff787408bcc523ebd4b7919db65423f741351664 (diff)
downloadhercules-e2ab0ffb71a44ff2a5b675e988e78137a00e183f.tar.gz
hercules-e2ab0ffb71a44ff2a5b675e988e78137a00e183f.tar.bz2
hercules-e2ab0ffb71a44ff2a5b675e988e78137a00e183f.tar.xz
hercules-e2ab0ffb71a44ff2a5b675e988e78137a00e183f.zip
Fixed Bug 8171
Char server could crash if attempting to log-in a character while map server hasn't completed the char >- <- map handshake Special Thanks to memoryss http://hercules.ws/board/tracker/issue-8171-char-server-crash-oninterifinitoninterifinitonce/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 0d96d40cb..6549ead3c 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2239,7 +2239,7 @@ void loginif_on_ready(void)
send_accounts_tologin(INVALID_TIMER, timer->gettick(), 0, 0);
// if no map-server already connected, display a message...
- ARR_FIND( 0, ARRAYLENGTH(server), i, server[i].fd > 0 && server[i].map[0] );
+ ARR_FIND( 0, ARRAYLENGTH(server), i, server[i].fd > 0 && server[i].map );
if( i == ARRAYLENGTH(server) )
ShowStatus("Awaiting maps from map-server.\n");
}
@@ -4279,7 +4279,7 @@ int parse_char(int fd)
}
#endif
- ARR_FIND( 0, ARRAYLENGTH(server), server_id, server[server_id].fd > 0 && server[server_id].map[0] );
+ ARR_FIND( 0, ARRAYLENGTH(server), server_id, server[server_id].fd > 0 && server[server_id].map );
/* not available, tell it to wait (client wont close; char select will respawn).
* magic response found by Ind thanks to Yommy <3 */
if( server_id == ARRAYLENGTH(server) ) {
@@ -4350,7 +4350,7 @@ int parse_char(int fd)
if (i < 0 || !cd->last_point.map) {
unsigned short j;
//First check that there's actually a map server online.
- ARR_FIND( 0, ARRAYLENGTH(server), j, server[j].fd >= 0 && server[j].map[0] );
+ ARR_FIND( 0, ARRAYLENGTH(server), j, server[j].fd >= 0 && server[j].map );
if (j == ARRAYLENGTH(server)) {
ShowInfo("Connection Closed. No map servers available.\n");
WFIFOHEAD(fd,3);