Skip to content

Commit

Permalink
Fixing parameter count check for UI_create_barge_object. Fixed UI_pri…
Browse files Browse the repository at this point in the history
…ntf.

Both found by Coverity Scan.
  • Loading branch information
marzojr committed Nov 26, 2016
1 parent 8bf1fe0 commit 36671df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usecode/intrinsics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3319,6 +3319,7 @@ USECODE_INTRINSIC(printf) {
else
p.print(cout);
spec += 2;
i++;
} else {
cout << '%';
spec++;
Expand Down Expand Up @@ -3420,7 +3421,7 @@ USECODE_INTRINSIC(create_barge_object) {

Barge_object *b = new Barge_object(961, 0, 0, 0, 0,
parms[0].get_int_value(), parms[1].get_int_value(),
num_parms >= 2 ? ((parms[2].get_int_value() >> 1) & 3) : 0);
num_parms >= 3 ? ((parms[2].get_int_value() >> 1) & 3) : 0);

b->set_invalid(); // Not in world yet.
b->set_flag(Obj_flags::okay_to_take);
Expand Down

0 comments on commit 36671df

Please sign in to comment.