aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-05-31 19:04:20 +0000
committerRichard M. Stallman1993-05-31 19:04:20 +0000
commitd88c2b9e63c97fecb5d7edef8b6706a217c227ec (patch)
tree9ae3ef1221fcbed3414554c15ce71057a2b840ac
parent7fb08f691ea45f8e1593497a85478ba52bf95a1e (diff)
downloademacs-d88c2b9e63c97fecb5d7edef8b6706a217c227ec.tar.gz
emacs-d88c2b9e63c97fecb5d7edef8b6706a217c227ec.zip
(update_frame): Make preempt_count positive.
Defend against negative baud_rate.
-rw-r--r--src/dispnew.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index e9c7521494a..a5f35362f1c 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -955,6 +955,9 @@ update_frame (f, force, inhibit_hairy_id)
955 register int downto, leftmost; 955 register int downto, leftmost;
956#endif 956#endif
957 957
958 if (preempt_count <= 0)
959 preempt_count = 1;
960
958 if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */ 961 if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */
959 962
960 detect_input_pending (); 963 detect_input_pending ();
@@ -1025,7 +1028,8 @@ update_frame (f, force, inhibit_hairy_id)
1025 outq = PENDING_OUTPUT_COUNT (stdout); 1028 outq = PENDING_OUTPUT_COUNT (stdout);
1026#endif 1029#endif
1027 outq *= 10; 1030 outq *= 10;
1028 sleep (outq / baud_rate); 1031 if (baud_rate > 0)
1032 sleep (outq / baud_rate);
1029 } 1033 }
1030 } 1034 }
1031 if ((i - 1) % preempt_count == 0) 1035 if ((i - 1) % preempt_count == 0)