Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a14e1568
Commit
a14e1568
authored
Oct 24, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* character.c (Funibyte_string): Use CHECK_RANGED_INTEGER instead.
parent
0fd11aa5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
src/ChangeLog
src/ChangeLog
+1
-1
src/character.c
src/character.c
+2
-6
No files found.
src/ChangeLog
View file @
a14e1568
...
...
@@ -106,7 +106,7 @@
(str_as_unibyte, str_to_unibyte, string_count_byte8)
(string_escape_byte8, Fget_byte):
Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
(Funibyte_string): Use CHECK_
CHARACT
ER, not CHECK_NATNUM, to
(Funibyte_string): Use CHECK_
RANGED_INTEG
ER, not CHECK_NATNUM, to
avoid mishandling large integers.
* character.h: Adjust decls to match defn changes elsewhere.
* charset.c (load_charset_map_from_file, find_charsets_in_text)
...
...
src/character.c
View file @
a14e1568
...
...
@@ -924,7 +924,6 @@ usage: (unibyte-string &rest BYTES) */)
(
ptrdiff_t
n
,
Lisp_Object
*
args
)
{
ptrdiff_t
i
;
int
c
;
unsigned
char
*
buf
,
*
p
;
Lisp_Object
str
;
USE_SAFE_ALLOCA
;
...
...
@@ -934,11 +933,8 @@ usage: (unibyte-string &rest BYTES) */)
for
(
i
=
0
;
i
<
n
;
i
++
)
{
CHECK_CHARACTER
(
args
[
i
]);
c
=
XFASTINT
(
args
[
i
]);
if
(
c
>=
256
)
args_out_of_range_3
(
args
[
i
],
make_number
(
0
),
make_number
(
255
));
*
p
++
=
c
;
CHECK_RANGED_INTEGER
(
0
,
args
[
i
],
255
);
*
p
++
=
XINT
(
args
[
i
]);
}
str
=
make_string_from_bytes
((
char
*
)
buf
,
n
,
p
-
buf
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment