Fix turn right

Submitted by: "Klaus-J. Wolf" <Yanestra@t-online.de>
This commit is contained in:
ache 1997-09-24 23:18:44 +00:00
parent 1c68b49bec
commit 7b9f8d764e

View File

@ -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);
}