mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-23 06:21:29 -07:00
Fix get_conversion_field --with-wide-wint overflow
* src/textconv.c (get_conversion_field): Set max value to PTRDIFF_MAX, not MOST_POSITIVE_FIXNUM, since the variable is ptrdiff_t, not EMACS_INT. Problem caught by gcc -Woverflow on a 32-bit platform with --with-wide-int.
This commit is contained in:
parent
a4bafce01e
commit
b4050ab75e
1 changed files with 2 additions and 2 deletions
|
|
@ -1741,7 +1741,7 @@ handle_pending_conversion_events (void)
|
|||
|
||||
/* Return the confines of the field to which editing operations on frame
|
||||
F should be constrained in *BEG and *END. Should no field be active,
|
||||
set *END to MOST_POSITIVE_FIXNUM. */
|
||||
set *END to PTRDIFF_MAX. */
|
||||
|
||||
void
|
||||
get_conversion_field (struct frame *f, ptrdiff_t *beg, ptrdiff_t *end)
|
||||
|
|
@ -1769,7 +1769,7 @@ get_conversion_field (struct frame *f, ptrdiff_t *beg, ptrdiff_t *end)
|
|||
}
|
||||
|
||||
*beg = 1;
|
||||
*end = MOST_POSITIVE_FIXNUM;
|
||||
*end = PTRDIFF_MAX;
|
||||
}
|
||||
|
||||
/* Start a ``batch edit'' in frame F. During a batch edit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue