Fix turn right
Submitted by: "Klaus-J. Wolf" <Yanestra@t-online.de>
This commit is contained in:
parent
1c68b49bec
commit
7b9f8d764e
@ -413,7 +413,7 @@ right(c)
|
||||
{
|
||||
dir = D_RIGHT;
|
||||
p.new_dir = p.dir + 1;
|
||||
if (p.new_dir > MAXDIR)
|
||||
if (p.new_dir >= MAXDIR)
|
||||
p.new_dir -= MAXDIR;
|
||||
return (NULL);
|
||||
}
|
||||
@ -431,7 +431,7 @@ char *
|
||||
Right(c)
|
||||
{
|
||||
p.new_dir = p.dir + 2;
|
||||
if (p.new_dir > MAXDIR)
|
||||
if (p.new_dir >= MAXDIR)
|
||||
p.new_dir -= MAXDIR;
|
||||
return (NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user