aboutsummaryrefslogtreecommitdiffstats
path: root/src/fringe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fringe.c')
-rw-r--r--src/fringe.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fringe.c b/src/fringe.c
index 25fecca2334..727547b1ab7 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -474,7 +474,7 @@ int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
474int 474int
475lookup_fringe_bitmap (Lisp_Object bitmap) 475lookup_fringe_bitmap (Lisp_Object bitmap)
476{ 476{
477 int bn; 477 EMACS_INT bn;
478 478
479 bitmap = Fget (bitmap, Qfringe); 479 bitmap = Fget (bitmap, Qfringe);
480 if (!INTEGERP (bitmap)) 480 if (!INTEGERP (bitmap))
@@ -696,7 +696,7 @@ static int
696get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, int partial_p) 696get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, int partial_p)
697{ 697{
698 Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm; 698 Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm;
699 int ln1 = 0, ln2 = 0; 699 EMACS_INT ln1 = 0, ln2 = 0;
700 int ix1 = right_p; 700 int ix1 = right_p;
701 int ix2 = ix1 + (partial_p ? 2 : 0); 701 int ix2 = ix1 + (partial_p ? 2 : 0);
702 702
@@ -1555,7 +1555,7 @@ If BITMAP already exists, the existing definition is replaced. */)
1555 else 1555 else
1556 { 1556 {
1557 CHECK_NUMBER (height); 1557 CHECK_NUMBER (height);
1558 fb.height = min (XINT (height), 255); 1558 fb.height = max (0, min (XINT (height), 255));
1559 if (fb.height > h) 1559 if (fb.height > h)
1560 { 1560 {
1561 fill1 = (fb.height - h) / 2; 1561 fill1 = (fb.height - h) / 2;
@@ -1568,7 +1568,7 @@ If BITMAP already exists, the existing definition is replaced. */)
1568 else 1568 else
1569 { 1569 {
1570 CHECK_NUMBER (width); 1570 CHECK_NUMBER (width);
1571 fb.width = min (XINT (width), 255); 1571 fb.width = max (0, min (XINT (width), 255));
1572 } 1572 }
1573 1573
1574 fb.period = 0; 1574 fb.period = 0;
@@ -1704,7 +1704,7 @@ Return nil if POS is not visible in WINDOW. */)
1704{ 1704{
1705 struct window *w; 1705 struct window *w;
1706 struct glyph_row *row; 1706 struct glyph_row *row;
1707 int textpos; 1707 ptrdiff_t textpos;
1708 1708
1709 if (NILP (window)) 1709 if (NILP (window))
1710 window = selected_window; 1710 window = selected_window;
@@ -1714,6 +1714,8 @@ Return nil if POS is not visible in WINDOW. */)
1714 if (!NILP (pos)) 1714 if (!NILP (pos))
1715 { 1715 {
1716 CHECK_NUMBER_COERCE_MARKER (pos); 1716 CHECK_NUMBER_COERCE_MARKER (pos);
1717 if (! (BEGV <= XINT (pos) && XINT (pos) <= ZV))
1718 args_out_of_range (window, pos);
1717 textpos = XINT (pos); 1719 textpos = XINT (pos);
1718 } 1720 }
1719 else if (w == XWINDOW (selected_window)) 1721 else if (w == XWINDOW (selected_window))