Skip to content

Commit

Permalink
invalid type check
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonch35 committed Jul 31, 2024
1 parent 9c48f4f commit a79cc0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -9938,6 +9938,13 @@ static BUILDIN(getpartymember)
st->state = END;
return false;
}

if (type < PT_MEMBER_NAME || type > PT_MEMBER_ACCID) {
ShowError("buildin_getpartymember: Invalid type argument\n");
script->reportdata(data);
st->state = END;
return false;
}

if (!is_int_variable(varname) && (type == PT_MEMBER_CHARID || type == PT_MEMBER_ACCID)) {
ShowError("buildin_getpartymember: Target argument is not an int variable\n");
Expand Down

0 comments on commit a79cc0d

Please sign in to comment.