aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/editfns.c b/src/editfns.c
index bb805419293..3ad14164a8f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -589,6 +589,8 @@ is returned as a character.")
589 pos_byte = PT_BYTE; 589 pos_byte = PT_BYTE;
590 else if (MARKERP (pos)) 590 else if (MARKERP (pos))
591 pos_byte = marker_byte_position (pos); 591 pos_byte = marker_byte_position (pos);
592 else if (pos <= BEGV || pos > ZV)
593 return Qnil;
592 else 594 else
593 { 595 {
594 CHECK_NUMBER_COERCE_MARKER (pos, 0); 596 CHECK_NUMBER_COERCE_MARKER (pos, 0);
@@ -596,9 +598,6 @@ is returned as a character.")
596 pos_byte = CHAR_TO_BYTE (XINT (pos)); 598 pos_byte = CHAR_TO_BYTE (XINT (pos));
597 } 599 }
598 600
599 if (pos_byte <= BEGV_BYTE || pos_byte > ZV_BYTE)
600 return Qnil;
601
602 if (!NILP (current_buffer->enable_multibyte_characters)) 601 if (!NILP (current_buffer->enable_multibyte_characters))
603 { 602 {
604 DEC_POS (pos_byte); 603 DEC_POS (pos_byte);