From 9242fc277751e76f7f9204ff7fca98ce59e6de57 Mon Sep 17 00:00:00 2001 From: Skotlex Date: Wed, 10 Aug 2011 16:53:47 +0000 Subject: - added sending a dummy 0x08b9 packet in the char-server, required to support clients from this year. - added a fix to status_heal to take into account that -int_max == int_max in some architectures, which leads to an infinite loop (bugreport:3410) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14930 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/status.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/map') diff --git a/src/map/status.c b/src/map/status.c index 69f6757d0..33ad82eb3 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -869,6 +869,7 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag) sc = NULL; if (hp < 0) { + if (hp == INT_MIN) hp++; //-INT_MIN == INT_MIN in some architectures! status_damage(NULL, bl, -hp, 0, 0, 1); hp = 0; } @@ -882,6 +883,7 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag) } if(sp < 0) { + if (sp==INT_MIN) sp++; status_damage(NULL, bl, 0, -sp, 0, 1); sp = 0; } -- cgit v1.2.3-70-g09d2