misc fixes inspired by an idiot
authorroot <root>
Mon, 9 Oct 2006 23:12:45 +0000 (23:12 +0000)
committerroot <root>
Mon, 9 Oct 2006 23:12:45 +0000 (23:12 +0000)
src/keyboard.C
src/screen.C

index 53f8fdae6f42d2a0471f51e8ccbd1740c710a989..0951eace3757c34369d233d174df8bc5b3858c93 100644 (file)
@@ -238,7 +238,7 @@ keyboard_manager::register_user_translation (KeySym keysym, unsigned int state,
               key->type  = keysym_t::LIST;
               key->range = suffix - middle - 1;
 
-              strcpy (translation, translation + 4);
+              memmove (translation, translation + 4, strlen (translation + 4) + 1);
             }
           else
             rxvt_warn ("cannot parse list-type keysym '%s', treating as normal keysym.\n", translation);
index bc532106b4b5d6290eca9a2ffe4046d19ef91d5d..28089c0fc4363a157e9244ca2630a12e20b22bfc 100644 (file)
@@ -411,7 +411,7 @@ rxvt_term::scr_reset ()
 
   tabs = (char *)rxvt_malloc (ncol * sizeof (char));
 
-  for (int col = ncol; col--; )
+  for (int col = ncol; --col; )
     tabs [col] = col % TABSIZE == 0;
 
   if (current_screen != PRIMARY)
@@ -2351,9 +2351,7 @@ rxvt_term::scr_refresh () NOTHROW
            */
           rxvt_font *font = (*fontset[GET_STYLE (rend)])[GET_FONT (rend)];
 
-          if (back == fore)
-            font->clear_rect (*drawable, xpixel, ypixel, fwidth * count, fheight, back);
-          else if (back == Color_bg && have_bg)
+          if (back == Color_bg && have_bg)
             {
               // this is very ugly, maybe push it into ->draw?