X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fknight.c;h=f9ba1dc25bf083ea9ee73cdd40f5af87fec9c48c;hp=af0ca8ab945052b0ae516fbd5d7783ace8ef1149;hb=78e49873c69dc0494bb34c62f897f8b446584a33;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/test/knight.c b/test/knight.c index af0ca8ab..f9ba1dc2 100644 --- a/test/knight.c +++ b/test/knight.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -33,7 +33,7 @@ * Eric S. Raymond July 22 1995. Mouse support * added September 20th 1995. * - * $Id: knight.c,v 1.27 2006/04/22 22:41:22 tom Exp $ + * $Id: knight.c,v 1.28 2008/08/03 23:04:26 tom Exp $ */ #include @@ -383,7 +383,7 @@ drawmove(chtype tchar, int oldy, int oldx, int row, int column) mark_possibles(oldy, oldx, ' '); } - if (row != -1 && column != -1) { + if (row >= 0 && column >= 0) { markcell(trail, row, column); mark_possibles(row, column, minus); board[row][column] = TRUE;