Commit 800d3815 authored by Paul Eggert's avatar Paul Eggert

Minor overflow fix in translate-region-internal

* src/editfns.c (Ftranslate_region_internal):
Use ptrdiff_t, not int, for a count that might exceed INT_MAX.
parent c48ea7c0
......@@ -2437,7 +2437,7 @@ It returns the number of characters changed. */)
{
register unsigned char *tt; /* Trans table. */
register int nc; /* New character. */
int cnt; /* Number of changes made. */
ptrdiff_t cnt; /* Number of changes made. */
ptrdiff_t size; /* Size of translate table. */
ptrdiff_t pos, pos_byte, end_pos;
bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment