date and time created 83/05/31 00:19:54 by sam
[unix-history] / usr / src / lib / libcurses / delch.c
index 29d2fe7..3ae3e29 100644 (file)
@@ -4,7 +4,7 @@
  *     This routine performs an insert-char on the line, leaving
  * (_cury,_curx) unchanged.
  *
  *     This routine performs an insert-char on the line, leaving
  * (_cury,_curx) unchanged.
  *
- * @(#)delch.c 1.1 (Berkeley) %G%
+ * @(#)delch.c 1.2 (Berkeley) %G%
  */
 wdelch(win)
 reg WINDOW     *win; {
  */
 wdelch(win)
 reg WINDOW     *win; {
@@ -13,8 +13,8 @@ reg WINDOW    *win; {
        reg char        *end;
 
        end = &win->_y[win->_cury][win->_maxx - 1];
        reg char        *end;
 
        end = &win->_y[win->_cury][win->_maxx - 1];
-       temp2 = &win->_y[win->_cury][win->_curx + 1];
-       temp1 = temp2 - 1;
+       temp1 = &win->_y[win->_cury][win->_curx];
+       temp2 = temp1 + 1;
        while (temp1 < end)
                *temp1++ = *temp2++;
        *temp1 = ' ';
        while (temp1 < end)
                *temp1++ = *temp2++;
        *temp1 = ' ';