aboutsummaryrefslogtreecommitdiffstats
path: root/src/textconv.c
diff options
context:
space:
mode:
authorPo Lu2023-05-18 09:04:57 +0800
committerPo Lu2023-05-18 09:04:57 +0800
commit074c0268fd32d6527e124cff386bb6b15cf90017 (patch)
tree62111c3c70d46a738f15514e988a707409ca45f4 /src/textconv.c
parentdb48eff8cf4a88393c0209f663ca194ee37fa747 (diff)
parent5ef169ed701fa4f850fdca5563cdd468207d5d4f (diff)
downloademacs-074c0268fd32d6527e124cff386bb6b15cf90017.tar.gz
emacs-074c0268fd32d6527e124cff386bb6b15cf90017.zip
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src/textconv.c')
-rw-r--r--src/textconv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/textconv.c b/src/textconv.c
index e1a73e91397..26f351dc729 100644
--- a/src/textconv.c
+++ b/src/textconv.c
@@ -235,7 +235,7 @@ textconv_query (struct frame *f, struct textconv_callback_struct *query,
235 overflows, move back to point or to the extremes of the 235 overflows, move back to point or to the extremes of the
236 accessible region. */ 236 accessible region. */
237 237
238 if (INT_ADD_WRAPV (pos, query->position, &pos)) 238 if (ckd_add (&pos, pos, query->position))
239 pos = PT; 239 pos = PT;
240 240
241 escape1: 241 escape1:
@@ -257,7 +257,7 @@ textconv_query (struct frame *f, struct textconv_callback_struct *query,
257 { 257 {
258 case TEXTCONV_FORWARD_CHAR: 258 case TEXTCONV_FORWARD_CHAR:
259 /* Move forward by query->factor characters. */ 259 /* Move forward by query->factor characters. */
260 if (INT_ADD_WRAPV (pos, query->factor, &end) || end > ZV) 260 if (ckd_add (&end, pos, query->factor) || end > ZV)
261 end = ZV; 261 end = ZV;
262 262
263 end_byte = CHAR_TO_BYTE (end); 263 end_byte = CHAR_TO_BYTE (end);
@@ -265,7 +265,7 @@ textconv_query (struct frame *f, struct textconv_callback_struct *query,
265 265
266 case TEXTCONV_BACKWARD_CHAR: 266 case TEXTCONV_BACKWARD_CHAR:
267 /* Move backward by query->factor characters. */ 267 /* Move backward by query->factor characters. */
268 if (INT_SUBTRACT_WRAPV (pos, query->factor, &end) || end < BEGV) 268 if (ckd_sub (&end, pos, query->factor) || end < BEGV)
269 end = BEGV; 269 end = BEGV;
270 270
271 end_byte = CHAR_TO_BYTE (end); 271 end_byte = CHAR_TO_BYTE (end);