X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_touch.c;h=8023c705802766c40ebd7090c759de12b97d0c6b;hp=3f8771a839fd3e2e1706251a18a3c0e256d0322a;hb=03f728e5bb3630a54fffc4a2ff2f8dbfcce9088e;hpb=3a0d9d27e0cf115ff9dcc6163c251bccaa62bd7d;ds=sidebyside diff --git a/ncurses/base/lib_touch.c b/ncurses/base/lib_touch.c index 3f8771a8..8023c705 100644 --- a/ncurses/base/lib_touch.c +++ b/ncurses/base/lib_touch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_touch.c,v 1.10 2009/10/24 22:36:29 tom Exp $") +MODULE_ID("$Id: lib_touch.c,v 1.11 2010/12/19 01:22:58 tom Exp $") NCURSES_EXPORT(bool) is_linetouched(WINDOW *win, int line) @@ -85,7 +85,9 @@ wtouchln(WINDOW *win, int y, int n, int changed) if (i > win->_maxy) break; win->_line[i].firstchar = changed ? 0 : _NOCHANGE; - win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE; + win->_line[i].lastchar = (NCURSES_SIZE_T) (changed + ? win->_maxx + : _NOCHANGE); } returnCode(OK); }