Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f98176d2
Commit
f98176d2
authored
Oct 26, 2002
by
Richard M. Stallman
Browse files
(Fformat): Detect invalid format letters for floats.
parent
5a6f4c95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/editfns.c
src/editfns.c
+6
-1
No files found.
src/editfns.c
View file @
f98176d2
...
...
@@ -3259,7 +3259,12 @@ usage: (format STRING &rest OBJECTS) */)
else
if
(
FLOATP
(
args
[
n
])
&&
*
format
!=
's'
)
{
if
(
!
(
*
format
==
'e'
||
*
format
==
'f'
||
*
format
==
'g'
))
args
[
n
]
=
Ftruncate
(
args
[
n
],
Qnil
);
{
if
(
*
format
!=
'd'
&&
*
format
!=
'o'
&&
*
format
!=
'x'
&&
*
format
!=
'i'
&&
*
format
!=
'X'
&&
*
format
!=
'c'
)
error
(
"Invalid format operation %%%c"
,
*
format
);
args
[
n
]
=
Ftruncate
(
args
[
n
],
Qnil
);
}
/* Note that we're using sprintf to print floats,
so we have to take into account what that function
...
...
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