Changeset 14237

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

- Oops, realized the vsd cid check is before the null pointer check. I AM getting rusty <_<

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/map/vending.c

    r14234 r14237  
    6565 
    6666    nullpo_retv(sd); 
     67    if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id ) 
     68        return; // invalid shop 
    6769#if PACKETVER >= 20100105 
    6870    if( vsd->status.char_id != cid ) 
    6971        return; //Char-ID check 
    7072#endif 
    71  
    72     if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id ) 
    73         return; // invalid shop 
    7473    if( sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, AREA_SIZE) ) 
    7574        return; // shop too far away