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:
af4fecb
)
(Fchar_before): Do range check before decrement.
author
Richard M. Stallman
<rms@gnu.org>
Mon, 18 Aug 1997 18:56:07 +0000
(18:56 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Mon, 18 Aug 1997 18:56:07 +0000
(18:56 +0000)
src/editfns.c
patch
|
blob
|
blame
|
history
diff --git
a/src/editfns.c
b/src/editfns.c
index
c8a6506
..
c12ea5a
100644
(file)
--- a/
src/editfns.c
+++ b/
src/editfns.c
@@
-610,18
+610,17
@@
is returned as a character.")
n = XINT (pos);
}
+ if (n <= BEGV || n > ZV)
+ return Qnil;
+
if (!NILP (current_buffer->enable_multibyte_characters))
{
DEC_POS (n);
- if (n < BEGV || n >= ZV)
- return Qnil;
XSETFASTINT (val, FETCH_CHAR (n));
}
else
{
n--;
- if (n < BEGV || n >= ZV)
- return Qnil;
XSETFASTINT (val, FETCH_BYTE (n));
}
return val;