]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix overflow lockup with frames > 255 lines
authorScott Corley <scott@scorley.com>
Sun, 7 Oct 2018 07:10:29 +0000 (00:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Oct 2018 07:11:48 +0000 (00:11 -0700)
* src/scroll.c (struct matrix_elt): Change unsigned char fields to
int to handle frames with more than 255 lines (Bug#32951).
Copyright-paperwork-exempt: yes

src/scroll.c

index a29f2d37f546d5ad9483295545e714c1a771b009..240005b4e3203cfb3b123e06af63ae071d4dc0bd 100644 (file)
@@ -41,13 +41,13 @@ struct matrix_elt
     int deletecost;
     /* Number of inserts so far in this run of inserts,
        for the cost in insertcost.  */
-    unsigned char insertcount;
+    int insertcount;
     /* Number of deletes so far in this run of deletes,
        for the cost in deletecost.  */
-    unsigned char deletecount;
+    int deletecount;
     /* Number of writes so far since the last insert
        or delete for the cost in writecost. */
-    unsigned char writecount;
+    int writecount;
   };
 
 static void do_direct_scrolling (struct frame *,