Quellcode durchsuchen

Update

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@925 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber vor 20 Jahren
Ursprung
Commit
51a1d4d68d
4 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 1 0
      Changelog.txt
  2. 2 2
      src/map/map.c
  3. 1 1
      src/map/map.h
  4. 2 0
      src/map/pc.c

+ 1 - 0
Changelog.txt

@@ -1,5 +1,6 @@
 Date	Added
 01/06
+	* Fixed various memory corruptions causing crashes (SVN 925) [MouseJstr]
 	* Fixed typo in src/map/map.c causing compile 
 	  errors (SVN 924) [MouseJstr]
 	* Removed the alive_timer mechanism entirly replaced with

+ 2 - 2
src/map/map.c

@@ -2530,7 +2530,7 @@ int flush_timer(int tid, unsigned int tick, int id, int data){
 int id_db_final(void *k,void *d,va_list ap)
 {
 	struct mob_data *id;
-//	nullpo_retr(0, id=d);
+	nullpo_retr(0, id=d);
 	if(id->lootitem)
 		free(id->lootitem);
 	if(id)
@@ -2601,7 +2601,7 @@ void do_final(void) {
 
 //    do_final_timer(); (we used timer_final() instead)
     timer_final();
-    numdb_final(id_db, id_db_final);
+//    numdb_final(id_db, id_db_final);
     strdb_final(map_db, map_db_final);
     strdb_final(nick_db, nick_db_final);
     numdb_final(charid_db, charid_db_final);

+ 1 - 1
src/map/map.h

@@ -16,7 +16,7 @@
 #define LIFETIME_FLOORITEM 60
 #define DAMAGELOG_SIZE 30
 #define LOOTITEM_SIZE 10
-#define MAX_SKILL_LEVEL 20
+#define MAX_SKILL_LEVEL 100
 #define MAX_STATUSCHANGE 210
 #define MAX_SKILLUNITGROUP 32
 #define MAX_MOBSKILLUNITGROUP 8

+ 2 - 0
src/map/pc.c

@@ -6785,6 +6785,8 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
 
 	nullpo_retr(0, sd);
 
+	Assert(strlen(name) < 24);
+
 	for(i=0;i<MAX_EVENTTIMER;i++)
 		if( sd->eventtimer[i]==-1 )
 			break;