summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-28 18:25:32 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-28 18:25:32 +0000
commitcb1131db4cde40c0352e6c75069defab06128c93 (patch)
tree3544f604cbe0b49425c726b5343515beb7ba2e70 /src/common
parent4e643fd7733f69e080c0206d82980fb1003f76e0 (diff)
downloadhercules-cb1131db4cde40c0352e6c75069defab06128c93.tar.gz
hercules-cb1131db4cde40c0352e6c75069defab06128c93.tar.bz2
hercules-cb1131db4cde40c0352e6c75069defab06128c93.tar.xz
hercules-cb1131db4cde40c0352e6c75069defab06128c93.zip
* RFIFOREST returns 0 when the session is eof (input data is implicitly discarted).
* Reworked the player fame update: - would crash if an invalid pos was received - the wrong player could be updated on certain conditions git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10640 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/socket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/socket.h b/src/common/socket.h
index f1997defe..469ff678d 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -35,7 +35,7 @@
#define RFIFOSPACE(fd) (session[fd]->max_rdata - session[fd]->rdata_size)
#define WFIFOSPACE(fd) (session[fd]->max_wdata - session[fd]->wdata_size)
-#define RFIFOREST(fd) (session[fd]->rdata_size - session[fd]->rdata_pos)
+#define RFIFOREST(fd) (session[fd]->eof ? 0 : session[fd]->rdata_size - session[fd]->rdata_pos)
#define RFIFOFLUSH(fd) \
do { \
if(session[fd]->rdata_size == session[fd]->rdata_pos){ \