Explorar el Código

Fixed equip inventory list overflow (#9113)

The wrong constant was used for checking, which could result in an overflow, if you increased MAX_INVENTORY.

Thanks to @LadyNanuia and @Playtester
Lemongrass3110 hace 3 meses
padre
commit
448979c900
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/map/clif.cpp

+ 1 - 1
src/map/clif.cpp

@@ -3093,7 +3093,7 @@ void clif_inventorylist( map_session_data *sd ){
 		if( !itemdb_isstackable2( sd->inventory_data[i] ) ){
 			clif_item_equip( client_index( i ), &itemlist_equip.list[equip++], &sd->inventory.u.items_inventory[i], sd->inventory_data[i], pc_equippoint( sd, i ) );
 
-			if( equip == MAX_INVENTORY_ITEM_PACKET_NORMAL ){
+			if( equip == MAX_INVENTORY_ITEM_PACKET_EQUIP ){
 				itemlist_equip.PacketType  = inventorylistequipType;
 				itemlist_equip.PacketLength = static_cast<decltype(itemlist_equip.PacketLength)>( ( sizeof( itemlist_equip ) - sizeof( itemlist_equip.list ) ) + ( sizeof( struct EQUIPITEM_INFO ) * equip ) );
 #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002