Explorar el Código

- Oops, the overflow mentioned by foobar was actually because the equippable base-jobs field was unsigned short when we now need it to be unsigned int. Fixed now.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5884 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex hace 19 años
padre
commit
b4c3de9686
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/map/itemdb.c
  2. 1 1
      src/map/itemdb.h

+ 1 - 1
src/map/itemdb.c

@@ -194,7 +194,7 @@ struct item_data* itemdb_exists(int nameid)
  * to the format used by the map server. [Skotlex]
  *------------------------------------------
  */
-static void itemdb_jobid2mapid(unsigned short *bclass, int jobmask)
+static void itemdb_jobid2mapid(unsigned int *bclass, int jobmask)
 {
 	int i;
 	bclass[0]= bclass[1]= bclass[2]= 0;

+ 1 - 1
src/map/itemdb.h

@@ -32,7 +32,7 @@ struct item_data {
 	int wlv;
 //Lupus: I rearranged order of these fields due to compatibility with ITEMINFO script command
 //		some script commands should be revised as well...
-	unsigned short class_base[3];	//Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2)
+	unsigned int class_base[3];	//Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2)
 	unsigned class_upper : 3; //Specifies if the upper-type can equip it (1: normal, 2: upper, 3: baby)
 	unsigned char *script;	// 攻撃,防御の属性設定もこの中で可能かな?
 	struct {