Fixed an issue with mail (#7518)
* mail should accept card with ID 0 (no card) when the parameter card is provided
This commit is contained in:
parent
fa0253342a
commit
d0b51d91a0
@ -25778,7 +25778,7 @@ BUILDIN_FUNC(mail){
|
||||
for( k = 0; k < num_items && start < end; k++, start++ ){
|
||||
msg.item[k].card[i] = (t_itemid)get_val2_num( st, reference_uid( id, start ), reference_getref( data ) );
|
||||
|
||||
if( !item_db.exists(msg.item[k].card[i]) ){
|
||||
if( msg.item[k].card[i] > 0 && !item_db.exists(msg.item[k].card[i]) ){
|
||||
ShowError( "buildin_mail: invalid card id %u.\n", msg.item[k].card[i] );
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user