|
@@ -428,7 +428,7 @@ int intif_saveregistry(struct map_session_data *sd)
|
|
|
++len;
|
|
|
|
|
|
if (!lValid) { //this is sql colum size, must be retrive from config
|
|
|
- ShowError("intif_saveregistry: Variable name length is too long (aid: %d, cid: %d): '%s' sz=%d\n", sd->status.account_id, sd->status.char_id, varname, len);
|
|
|
+ ShowError("intif_saveregistry: Variable name length is too long (aid: %d, cid: %d): '%s' sz=%" PRIuPTR "\n", sd->status.account_id, sd->status.char_id, varname, len);
|
|
|
continue;
|
|
|
}
|
|
|
WFIFOB(inter_fd, plen) = (unsigned char)len; // won't be higher; the column size is 32
|
|
@@ -450,7 +450,7 @@ int intif_saveregistry(struct map_session_data *sd)
|
|
|
lValid = script_check_RegistryVariableLength(1,p->value,&len);
|
|
|
++len;
|
|
|
if ( !lValid ) { // error can't be higher; the column size is 254. (nb the transmission limit with be fixed with protobuf revamp)
|
|
|
- ShowDebug( "intif_saveregistry: Variable value length is too long (aid: %d, cid: %d): '%s' sz=%d to be saved with current system and will be truncated\n",sd->status.account_id, sd->status.char_id,p->value,len);
|
|
|
+ ShowDebug( "intif_saveregistry: Variable value length is too long (aid: %d, cid: %d): '%s' sz=%" PRIuPTR " to be saved with current system and will be truncated\n",sd->status.account_id, sd->status.char_id,p->value,len);
|
|
|
len = 254;
|
|
|
p->value[len - 1] = '\0'; //this is backward for old char-serv but new one doesn't need this
|
|
|
}
|
|
@@ -1488,7 +1488,7 @@ int intif_parse_LoadGuildStorage(int fd)
|
|
|
return 0;
|
|
|
}
|
|
|
if (RFIFOW(fd,2)-13 != sizeof(struct s_storage)) {
|
|
|
- ShowError("intif_parse_LoadGuildStorage: data size error %d %d\n",RFIFOW(fd,2)-13 , sizeof(struct s_storage));
|
|
|
+ ShowError("intif_parse_LoadGuildStorage: data size error %d %" PRIuPTR "\n",RFIFOW(fd,2)-13 , sizeof(struct s_storage));
|
|
|
gstor->status = false;
|
|
|
return 0;
|
|
|
}
|
|
@@ -1538,7 +1538,7 @@ int intif_parse_PartyInfo(int fd)
|
|
|
}
|
|
|
|
|
|
if( RFIFOW(fd,2) != 8+sizeof(struct party) )
|
|
|
- ShowError("intif: party info : data size error (char_id=%d party_id=%d packet_len=%d expected_len=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8), RFIFOW(fd,2), 8+sizeof(struct party));
|
|
|
+ ShowError("intif: party info : data size error (char_id=%d party_id=%d packet_len=%d expected_len=%" PRIuPTR ")\n", RFIFOL(fd,4), RFIFOL(fd,8), RFIFOW(fd,2), 8+sizeof(struct party));
|
|
|
party_recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
|
|
|
return 1;
|
|
|
}
|
|
@@ -1637,7 +1637,7 @@ int intif_parse_GuildInfo(int fd)
|
|
|
return 0;
|
|
|
}
|
|
|
if( RFIFOW(fd,2)!=sizeof(struct guild)+4 )
|
|
|
- ShowError("intif: guild info : data size error Gid: %d recv size: %d Expected size: %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild)+4);
|
|
|
+ ShowError("intif: guild info : data size error Gid: %d recv size: %d Expected size: %" PRIuPTR "\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild)+4);
|
|
|
guild_recv_info((struct guild *)RFIFOP(fd,4));
|
|
|
return 1;
|
|
|
}
|
|
@@ -1760,7 +1760,7 @@ int intif_parse_GuildMemberInfoChanged(int fd)
|
|
|
int intif_parse_GuildPosition(int fd)
|
|
|
{
|
|
|
if( RFIFOW(fd,2)!=sizeof(struct guild_position)+12 )
|
|
|
- ShowError("intif: guild info : data size error\n %d %d %d",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild_position)+12);
|
|
|
+ ShowError("intif: guild info : data size error %d %d %" PRIuPTR "\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild_position)+12);
|
|
|
guild_position_changed(RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12));
|
|
|
return 1;
|
|
|
}
|
|
@@ -1863,7 +1863,7 @@ int intif_parse_RecvPetData(int fd)
|
|
|
len=RFIFOW(fd,2);
|
|
|
if(sizeof(struct s_pet)!=len-9) {
|
|
|
if(battle_config.etc_log)
|
|
|
- ShowError("intif: pet data: data size error %d %d\n",sizeof(struct s_pet),len-9);
|
|
|
+ ShowError("intif: pet data: data size error %" PRIuPTR " %d\n",sizeof(struct s_pet),len-9);
|
|
|
}
|
|
|
else{
|
|
|
memcpy(&p,RFIFOP(fd,9),sizeof(struct s_pet));
|
|
@@ -1938,7 +1938,7 @@ int intif_parse_CreateHomunculus(int fd)
|
|
|
len=RFIFOW(fd,2)-9;
|
|
|
if(sizeof(struct s_homunculus)!=len) {
|
|
|
if(battle_config.etc_log)
|
|
|
- ShowError("intif: create homun data: data size error %d != %d\n",sizeof(struct s_homunculus),len);
|
|
|
+ ShowError("intif: create homun data: data size error %" PRIuPTR " != %d\n",sizeof(struct s_homunculus),len);
|
|
|
return 0;
|
|
|
}
|
|
|
hom_recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8)) ;
|
|
@@ -1958,7 +1958,7 @@ int intif_parse_RecvHomunculusData(int fd)
|
|
|
|
|
|
if(sizeof(struct s_homunculus)!=len) {
|
|
|
if(battle_config.etc_log)
|
|
|
- ShowError("intif: homun data: data size error %d %d\n",sizeof(struct s_homunculus),len);
|
|
|
+ ShowError("intif: homun data: data size error %" PRIuPTR " %d\n",sizeof(struct s_homunculus),len);
|
|
|
return 0;
|
|
|
}
|
|
|
hom_recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8));
|
|
@@ -2306,7 +2306,7 @@ int intif_parse_Mail_inboxreceived(int fd)
|
|
|
|
|
|
if (RFIFOW(fd,2) - 10 != sizeof(struct mail_data))
|
|
|
{
|
|
|
- ShowError("intif_parse_Mail_inboxreceived: data size error %d %d\n", RFIFOW(fd,2) - 10, sizeof(struct mail_data));
|
|
|
+ ShowError("intif_parse_Mail_inboxreceived: data size error %d %" PRIuPTR "\n", RFIFOW(fd,2) - 10, sizeof(struct mail_data));
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -2382,7 +2382,7 @@ int intif_parse_Mail_getattach(int fd)
|
|
|
|
|
|
if (RFIFOW(fd, 2) - 16 != sizeof(struct item)*MAIL_MAX_ITEM)
|
|
|
{
|
|
|
- ShowError("intif_parse_Mail_getattach: data size error %d %d\n", RFIFOW(fd, 2) - 16, sizeof(struct item));
|
|
|
+ ShowError("intif_parse_Mail_getattach: data size error %d %" PRIuPTR "\n", RFIFOW(fd, 2) - 16, sizeof(struct item));
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -2564,7 +2564,7 @@ static void intif_parse_Mail_send(int fd)
|
|
|
|
|
|
if( RFIFOW(fd,2) - 4 != sizeof(struct mail_message) )
|
|
|
{
|
|
|
- ShowError("intif_parse_Mail_send: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct mail_message));
|
|
|
+ ShowError("intif_parse_Mail_send: data size error %d %" PRIuPTR "\n", RFIFOW(fd,2) - 4, sizeof(struct mail_message));
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -2725,7 +2725,7 @@ static void intif_parse_Auction_register(int fd)
|
|
|
|
|
|
if( RFIFOW(fd,2) - 4 != sizeof(struct auction_data) )
|
|
|
{
|
|
|
- ShowError("intif_parse_Auction_register: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct auction_data));
|
|
|
+ ShowError("intif_parse_Auction_register: data size error %d %" PRIuPTR "\n", RFIFOW(fd,2) - 4, sizeof(struct auction_data));
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -2935,7 +2935,7 @@ int intif_parse_mercenary_received(int fd)
|
|
|
if( sizeof(struct s_mercenary) != len )
|
|
|
{
|
|
|
if( battle_config.etc_log )
|
|
|
- ShowError("intif: create mercenary data size error %d != %d\n", sizeof(struct s_mercenary), len);
|
|
|
+ ShowError("intif: create mercenary data size error %" PRIuPTR " != %d\n", sizeof(struct s_mercenary), len);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -3060,7 +3060,7 @@ int intif_parse_elemental_received(int fd)
|
|
|
if( sizeof(struct s_elemental) != len )
|
|
|
{
|
|
|
if( battle_config.etc_log )
|
|
|
- ShowError("intif: create elemental data size error %d != %d\n", sizeof(struct s_elemental), len);
|
|
|
+ ShowError("intif: create elemental data size error %" PRIuPTR " != %d\n", sizeof(struct s_elemental), len);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -3427,7 +3427,7 @@ static bool intif_parse_StorageReceived(int fd)
|
|
|
}
|
|
|
}
|
|
|
if (RFIFOW(fd,2)-10 != sz_stor) {
|
|
|
- ShowError("intif_parse_StorageReceived: data size error %d %d\n",RFIFOW(fd,2)-10 , sz_stor);
|
|
|
+ ShowError("intif_parse_StorageReceived: data size error %d %" PRIuPTR "\n",RFIFOW(fd,2)-10 , sz_stor);
|
|
|
stor->status = false;
|
|
|
return false;
|
|
|
}
|