Changeset 14238

Show
Ignore:
Timestamp:
01/30/10 10:39:16 (7 weeks ago)
Author:
skotlex
Message:

- Oops, realized the vsd cid check is before the null pointer check.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/stable/src/map/vending.c

    r14236 r14238  
    6565 
    6666    nullpo_retv(sd); 
     67 
     68    if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id ) 
     69        return; // invalid shop 
    6770#if PACKETVER >= 20100105 
    6871    if( vsd->status.char_id != cid ) 
    6972        return; //Char-ID check 
    7073#endif 
    71  
    72     if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id ) 
    73         return; // invalid shop 
    7474    if( sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, AREA_SIZE) ) 
    7575        return; // shop too far away