HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
588d2fd
)
(Fchar_before): Check POS in valid range
author
Karl Heuer
<kwzh@gnu.org>
Wed, 18 Feb 1998 22:56:25 +0000
(22:56 +0000)
committer
Karl Heuer
<kwzh@gnu.org>
Wed, 18 Feb 1998 22:56:25 +0000
(22:56 +0000)
before calling CHAR_TO_BYTE.
src/editfns.c
patch
|
blob
|
blame
|
history
diff --git
a/src/editfns.c
b/src/editfns.c
index
bb80541
..
3ad1416
100644
(file)
--- a/
src/editfns.c
+++ b/
src/editfns.c
@@
-589,6
+589,8
@@
is returned as a character.")
pos_byte = PT_BYTE;
else if (MARKERP (pos))
pos_byte = marker_byte_position (pos);
+ else if (pos <= BEGV || pos > ZV)
+ return Qnil;
else
{
CHECK_NUMBER_COERCE_MARKER (pos, 0);
@@
-596,9
+598,6
@@
is returned as a character.")
pos_byte = CHAR_TO_BYTE (XINT (pos));
}
- if (pos_byte <= BEGV_BYTE || pos_byte > ZV_BYTE)
- return Qnil;
-
if (!NILP (current_buffer->enable_multibyte_characters))
{
DEC_POS (pos_byte);