Skip to content

Commit

Permalink
Fixed script_rid2sd calls
Browse files Browse the repository at this point in the history
  • Loading branch information
secretdataz committed Mar 31, 2018
1 parent 2fd2b2c commit 86beb13
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/map/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22610,10 +22610,10 @@ BUILDIN_FUNC(costume)
TBL_PC *sd;

num = script_getnum(st, 2); // Equip Slot
sd = script_rid2sd(st);

if (sd == NULL)
if (!script_rid2sd(sd))
return SCRIPT_CMD_FAILURE;

if (equip_index_check(num))
i = pc_checkequip(sd, equip_bitmask[num]);
if (i < 0)
Expand Down Expand Up @@ -22660,8 +22660,7 @@ BUILDIN_FUNC(getcostumeitem)
TBL_PC *sd;
struct script_data *data;

sd = script_rid2sd(st);
if (sd == NULL)
if (!script_rid2sd(sd))
{ // No player attached.
script_pushint(st, 0);
return SCRIPT_CMD_SUCCESS;
Expand Down

0 comments on commit 86beb13

Please sign in to comment.