X-Git-Url: https://jxself.org/git/?p=wumpus.git;a=blobdiff_plain;f=superhack.c;h=f4f616e79c980464072f99942efb8e928619977b;hp=eacb8eb2d9befc0e91a9c3d7663e5a1ca92dfc0f;hb=ea272d4786a55dbaa493d016324b7a05b4f165b9;hpb=b709cdac8d6ce287a2d71a40f864b4e47f0ac265 diff --git a/superhack.c b/superhack.c index eacb8eb..f4f616e 100644 --- a/superhack.c +++ b/superhack.c @@ -231,7 +231,7 @@ void throw() } for (k = 0; k < j9; k++) - if (path[k] == path[k - 2]) + if (k >= 2 && path[k] == path[k - 2]) { (void) puts("Pies can't fly that crookedly --- try again."); return;