X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_addstr.c;h=4e3a040cf032d94ea71d8b1422496ff5219bcee9;hp=7428f5206278faf1e37e519edb9e024a103f1ddb;hb=491a3f08b795f494ae17179338c31a11b18fd433;hpb=28e9f9700c7bf7280cf9d71304a880b570a0b4ea diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c index 7428f520..4e3a040c 100644 --- a/ncurses/base/lib_addstr.c +++ b/ncurses/base/lib_addstr.c @@ -44,7 +44,7 @@ #include -MODULE_ID("$Id: lib_addstr.c,v 1.47 2007/04/07 17:13:21 tom Exp $") +MODULE_ID("$Id: lib_addstr.c,v 1.48 2007/10/13 19:56:57 tom Exp $") NCURSES_EXPORT(int) waddnstr(WINDOW *win, const char *astr, int n) @@ -129,8 +129,8 @@ NCURSES_EXPORT(int) wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n) { static const NCURSES_CH_T blank = NewChar(BLANK_TEXT); - NCURSES_SIZE_T y = win->_cury; - NCURSES_SIZE_T x = win->_curx; + NCURSES_SIZE_T y; + NCURSES_SIZE_T x; int code = OK; struct ldat *line; int i, j, start, len, end; @@ -140,6 +140,8 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n) if (!win) returnCode(ERR); + y = win->_cury; + x = win->_curx; if (n < 0) { n = _nc_wchstrlen(astr); }