diff options
Diffstat (limited to 'src/marker.c')
| -rw-r--r-- | src/marker.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/marker.c b/src/marker.c index 0b2e1bf5c6b..6358bc3bf79 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -529,7 +529,18 @@ set_marker_internal (Lisp_Object marker, Lisp_Object position, | |||
| 529 | don't want to call buf_charpos_to_bytepos if POSITION | 529 | don't want to call buf_charpos_to_bytepos if POSITION |
| 530 | is a marker and so we know the bytepos already. */ | 530 | is a marker and so we know the bytepos already. */ |
| 531 | if (FIXNUMP (position)) | 531 | if (FIXNUMP (position)) |
| 532 | charpos = XFIXNUM (position), bytepos = -1; | 532 | { |
| 533 | #if EMACS_INT_MAX > PTRDIFF_MAX | ||
| 534 | /* A --with-wide-int build. */ | ||
| 535 | EMACS_INT cpos = XFIXNUM (position); | ||
| 536 | if (cpos > PTRDIFF_MAX) | ||
| 537 | cpos = PTRDIFF_MAX; | ||
| 538 | charpos = cpos; | ||
| 539 | bytepos = -1; | ||
| 540 | #else | ||
| 541 | charpos = XFIXNUM (position), bytepos = -1; | ||
| 542 | #endif | ||
| 543 | } | ||
| 533 | else if (MARKERP (position)) | 544 | else if (MARKERP (position)) |
| 534 | { | 545 | { |
| 535 | charpos = XMARKER (position)->charpos; | 546 | charpos = XMARKER (position)->charpos; |