X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_addstr.c;fp=ncurses%2Fbase%2Flib_addstr.c;h=7428f5206278faf1e37e519edb9e024a103f1ddb;hp=b7a0b40ef948976a48e3340a431efdcbb57b4e58;hb=2639531af0c3ca25b48e7bcb9c790fa566cc5892;hpb=5a9c046f10f72b47ad32801a8e54fe3d05aa8051 diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c index b7a0b40e..7428f520 100644 --- a/ncurses/base/lib_addstr.c +++ b/ncurses/base/lib_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -44,7 +44,7 @@ #include -MODULE_ID("$Id: lib_addstr.c,v 1.46 2006/05/27 19:22:19 tom Exp $") +MODULE_ID("$Id: lib_addstr.c,v 1.47 2007/04/07 17:13:21 tom Exp $") NCURSES_EXPORT(int) waddnstr(WINDOW *win, const char *astr, int n) @@ -80,8 +80,7 @@ waddnstr(WINDOW *win, const char *astr, int n) NCURSES_EXPORT(int) waddchnstr(WINDOW *win, const chtype *astr, int n) { - NCURSES_SIZE_T y = win->_cury; - NCURSES_SIZE_T x = win->_curx; + NCURSES_SIZE_T y, x; int code = OK; int i; struct ldat *line; @@ -91,6 +90,8 @@ waddchnstr(WINDOW *win, const chtype *astr, int n) if (!win) returnCode(ERR); + y = win->_cury; + x = win->_curx; if (n < 0) { const chtype *str; n = 0;