X-Git-Url: https://jxself.org/git/?p=wumpus.git;a=blobdiff_plain;f=superhack.c;h=f4f616e79c980464072f99942efb8e928619977b;hp=82d480907a6238a75d50027700f511b8520af4c2;hb=ea272d4786a55dbaa493d016324b7a05b4f165b9;hpb=7c5bbc8a2733b23491f8b33ead72702f8dfece18 diff --git a/superhack.c b/superhack.c index 82d4809..f4f616e 100644 --- a/superhack.c +++ b/superhack.c @@ -3,9 +3,8 @@ * * Author: Eric S. Raymond * - * My update of a classic adventure game. The C is crude because it's - * a hack on a line-by-line translation of a BASIC `Hunt The Wumpus'. - * This code is no relation to the elaborate dungeon game called `Hack'. + * My update of a classic adventure game. This code is no relation to + * the elaborate dungeon game called `Hack'. * * Any resemblance to persons living or dead is strictly coincidental. And * if you believe *that*... @@ -232,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;