Skip to content

Commit

Permalink
k: check for a negative argument earlier.
Browse files Browse the repository at this point in the history
  • Loading branch information
Deewiant committed Sep 21, 2009
1 parent 90b43e1 commit 3c77413
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ccbi/instructions/std.d
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,17 @@ Request iterate() {

auto r = Request.MOVE;

// negative argument is undefined by spec, just ignore it
if (n <= 0)
return r;

auto i = cip.cell;

if (i == ' ' || i == ';') {
cip.gotoNextInstruction();
i = cip.unsafeCell;
}

// negative argument is undefined by spec, just ignore it
if (n <= 0)
return r;

// k executes its operand from where k is
// and doesn't move past it
cip.pos = pos;
Expand Down

0 comments on commit 3c77413

Please sign in to comment.