X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_mvwin.c;h=090d8fe730abc6cd6cb89aeda7246866bb4200a5;hp=e4dad4a746f08ec811e5f6fd333676639af552f5;hb=7a6bbc8cf41c5186d46accc3d08622dc86526b34;hpb=fc79b49bd8a9c5e4db287514cdac46e1691cf48a diff --git a/ncurses/base/lib_mvwin.c b/ncurses/base/lib_mvwin.c index e4dad4a7..090d8fe7 100644 --- a/ncurses/base/lib_mvwin.c +++ b/ncurses/base/lib_mvwin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2006 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 * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_mvwin.c,v 1.14 2006/02/25 22:53:46 tom Exp $") +MODULE_ID("$Id: lib_mvwin.c,v 1.15 2009/04/18 18:25:37 tom Exp $") NCURSES_EXPORT(int) mvwin(WINDOW *win, int by, int bx) @@ -96,8 +96,8 @@ mvwin(WINDOW *win, int by, int bx) } #endif - if (by + win->_maxy > screen_lines - 1 - || bx + win->_maxx > screen_columns - 1 + if (by + win->_maxy > screen_lines(CURRENT_SCREEN) - 1 + || bx + win->_maxx > screen_columns(CURRENT_SCREEN) - 1 || by < 0 || bx < 0) returnCode(ERR);