]> git.eshelyaron.com Git - emacs.git/commit
Fix signed/unsigned promotion errors involving Emacs_Rectangle
authorPo Lu <luangruo@yahoo.com>
Sun, 11 Feb 2024 02:00:33 +0000 (10:00 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Feb 2024 16:32:56 +0000 (17:32 +0100)
commit85c939b3da91914f7979a1870187a57fa0cad4b6
tree46dbbd546420e90cb79157a8eef6abc45cf3009a
parent75cce5ff5be017c2abb07ded464a214bc9e77e7c
Fix signed/unsigned promotion errors involving Emacs_Rectangle

* src/androidterm.c (android_note_mouse_movement):

* src/pgtkterm.c (note_mouse_movement):

* src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph)
(expose_area, expose_window, gui_intersect_rectangles): Cast
width or height fields in Emacs_Rectangles to int before summing
with or subtracting them from their coordinate fields, as they
are unsigned outside X, and the sign of the coordinates is thus
not preserved.

(cherry picked from commit e67e7185ce81e59c90741f92c2ba3209412f417e)
src/androidterm.c
src/pgtkterm.c
src/xdisp.c