diff options
author | Pip Cet <pipcet@gmail.com> | 2020-09-27 17:40:07 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-27 17:40:07 +0200 |
commit | a492013d07c59fab8eb9779924b384181e878a1a (patch) | |
tree | 5c0c1febc68cf1e0f0cdb047dbee29ef5a8665aa /src/cmds.c | |
parent | 433b6fc53dc9511077ed3a8c1ad130196dedbb55 (diff) | |
download | emacs-a492013d07c59fab8eb9779924b384181e878a1a.tar.gz |
Fix more single-byte accesses caused by bytepos/charpos confusion
* src/cmds.c (internal_self_insert): Use FETCH_BYTE, not
FETCH_CHAR, for a decremented byte position (bug#41520).
* src/xdisp.c (Fwindow_text_pixel_size, trailing_whitespace_p): Ditto.
Diffstat (limited to 'src/cmds.c')
-rw-r--r-- | src/cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmds.c b/src/cmds.c index 90526612b7a..c29cf00dad1 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -390,7 +390,7 @@ internal_self_insert (int c, EMACS_INT n) by spaces so that the remaining text won't move. */ ptrdiff_t actual = PT_BYTE; actual -= prev_char_len (actual); - if (FETCH_CHAR (actual) == '\t') + if (FETCH_BYTE (actual) == '\t') /* Rather than add spaces, let's just keep the tab. */ chars_to_delete--; else |