瀏覽代碼

Fix compile errors

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@578 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber 20 年之前
父節點
當前提交
ea99e6c3f7
共有 3 個文件被更改,包括 3 次插入2 次删除
  1. 1 0
      Changelog.txt
  2. 1 1
      src/map/atcommand.c
  3. 1 1
      src/map/charcommand.c

+ 1 - 0
Changelog.txt

@@ -1,5 +1,6 @@
 Date	Added
 12/16
+	* Fixed compile time errors for gcc 2.95 [MouseJstr]
 	* Added #itemlist, removed @charitemlist [MC Cameri]
 	* Changed @job and #job so that when it's used it unequips all the items, to prevent sprite errors [MC Cameri]
         * Updated Forging and Potion making formulas by DracoRPG [celest]

+ 1 - 1
src/map/atcommand.c

@@ -2039,6 +2039,7 @@ int atcommand_jobchange(
 		return 0;
 
 	if ((job >= 0 && job < MAX_PC_CLASS)) {
+		int j;
 
 		// fix pecopeco display
 		if ((job != 13 && job != 21 && job != 4014 && job != 4022)) {
@@ -2067,7 +2068,6 @@ int atcommand_jobchange(
 					job = 4015;
 			}
 		}
-		int j;
 		for (j=0; j < MAX_INVENTORY; j++) {
 			if(sd->status.inventory[j].nameid>0 && sd->status.inventory[j].equip!=0)
 				pc_unequipitem(sd, j, 3);

+ 1 - 1
src/map/charcommand.c

@@ -289,6 +289,7 @@ int charcommand_jobchange(
 	}
 
 	if ((pl_sd = map_nick2sd(character)) != NULL) {
+		int j;
 		if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change job only to lower or same level
 			if ((job >= 0 && job < MAX_PC_CLASS)) {
 
@@ -319,7 +320,6 @@ int charcommand_jobchange(
 							job = 4015;
 					}
 				}
-				int j;
 				for (j=0; j < MAX_INVENTORY; j++) {
 					if(pl_sd->status.inventory[j].nameid>0 && pl_sd->status.inventory[j].equip!=0)
 						pc_unequipitem(pl_sd, j, 3);