]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a blatant bug in restore_current_matrix.
authorEli Zaretskii <eliz@gnu.org>
Thu, 19 Sep 2013 13:51:38 +0000 (16:51 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 19 Sep 2013 13:51:38 +0000 (16:51 +0300)
src/dispnew.c

index f1df96d75a608ce6601936da815e8ec6c3c98954..0a9ce116ebb91f8bd76e30481285d09a9c8b239f 100644 (file)
@@ -1971,7 +1971,7 @@ restore_current_matrix (struct frame *f, struct glyph_matrix *saved)
       memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes);
       to->used[TEXT_AREA] = from->used[TEXT_AREA];
       xfree (from->glyphs[TEXT_AREA]);
-      nbytes = from->used[LEFT_MARGIN_AREA];
+      nbytes = from->used[LEFT_MARGIN_AREA] * sizeof (struct glyph);
       if (nbytes)
        {
          memcpy (to->glyphs[LEFT_MARGIN_AREA],
@@ -1981,7 +1981,7 @@ restore_current_matrix (struct frame *f, struct glyph_matrix *saved)
        }
       else
        to->used[LEFT_MARGIN_AREA] = 0;
-      nbytes = from->used[RIGHT_MARGIN_AREA];
+      nbytes = from->used[RIGHT_MARGIN_AREA] * sizeof (struct glyph);
       if (nbytes)
        {
          memcpy (to->glyphs[RIGHT_MARGIN_AREA],