Преглед изворни кода

- Fixed a possible crash in Venom Splasher if the countdown is too high.
- Small cleanup in clif.c hoping that it'll fix a mysterious crash.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5606 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex пре 19 година
родитељ
комит
40a34b3912
3 измењених фајлова са 5 додато и 3 уклоњено
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/clif.c
  3. 2 2
      src/map/status.c

+ 2 - 0
Changelog-Trunk.txt

@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/14
+	* Fixed a possible crash in Venom Splasher if the countdown is too high.
+	  [Skotlex]
 	* Fixed skill_notok blocking guild skills [Skotlex]
 	* Fixed Napalm vulcan's time2 entry in the skill_cast_db [Skotlex]
 	* Fixed the average_lv column size specification for levels above 255.

+ 1 - 1
src/map/clif.c

@@ -320,7 +320,7 @@ int clif_send_sub(struct block_list *bl, va_list ap)
 				//it's being received by everyone. [Skotlex]
 				if ((sd->special_state.intravision || sd->sc.data[SC_INTRAVISION].timer != -1 ) && bl != src_bl) {
 					struct status_change *sc = status_get_sc(src_bl);
-					if(sc && (sc->option)&(OPTION_HIDE|OPTION_CLOAK))
+					if(sc && (sc->option&(OPTION_HIDE|OPTION_CLOAK)))
 					{	//option‚Ì�C�³
 						switch(((unsigned short*)buf)[0])
 						{

+ 2 - 2
src/map/status.c

@@ -5503,8 +5503,8 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
 
 	case SC_SPLASHER:
 		if (sc->data[type].val4 % 1000 == 0) {
-			char timer[2];
-			sprintf (timer, "%d", sc->data[type].val4/1000);
+			char timer[10];
+			snprintf (timer, 10, "%d", sc->data[type].val4/1000);
 			clif_message(bl, timer);
 		}
 		if((sc->data[type].val4 -= 500) > 0) {