X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_pad.c;h=43d9ed7e33691e8fedf48b90cf1b6748cc04e09e;hp=7f9b8a84c6dbe61110c46f3277c151f18c42f301;hb=37babca07fea18b480155ef60ef302ca09fca152;hpb=78e49873c69dc0494bb34c62f897f8b446584a33;ds=sidebyside diff --git a/ncurses/base/lib_pad.c b/ncurses/base/lib_pad.c index 7f9b8a84..43d9ed7e 100644 --- a/ncurses/base/lib_pad.c +++ b/ncurses/base/lib_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2009 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 * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: lib_pad.c,v 1.42 2009/02/15 00:38:48 tom Exp $") +MODULE_ID("$Id: lib_pad.c,v 1.43 2009/04/18 18:25:37 tom Exp $") NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c) @@ -172,8 +172,8 @@ pnoutrefresh(WINDOW *win, pmaxcol = pmincol + smaxcol - smincol; } - if (smaxrow >= screen_lines - || smaxcol >= screen_columns + if (smaxrow >= screen_lines(CURRENT_SCREEN) + || smaxcol >= screen_columns(CURRENT_SCREEN) || sminrow > smaxrow || smincol > smaxcol) returnCode(ERR);