From d0444d585daf3f0203adb5779371e2e2cef57adf Mon Sep 17 00:00:00 2001 From: Paradox924X Date: Fri, 24 Oct 2008 21:32:59 +0000 Subject: Added protection from segfault by int overflow in charcommand heal and fixed a typo in atcommand heal. (Follow-up to r13321) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13322 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b19481e39..260288690 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1515,7 +1515,7 @@ int atcommand_heal(const int fd, struct map_session_data* sd, const char* comman if ( hp < -2147483647 || sp < -2147483647 ) { // Prevent overflow. [Paradox924X] status_damage(NULL, &sd->bl, 2147483647, 2147483647, 0, 0); - clif_damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0 , 4, 0); + clif_damage(&sd->bl,&sd->bl, gettick(), 0, 0, 2147483647, 0 , 4, 0); clif_displaymessage(fd, msg_txt(156)); // HP or/and SP modified. return 0; } -- cgit v1.2.3-70-g09d2