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
dfd351ef
Commit
dfd351ef
authored
Mar 07, 1994
by
Karl Heuer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(doprnt): Do the right thing for negative size spec.
parent
9f6c23bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/doprnt.c
src/doprnt.c
+2
-1
No files found.
src/doprnt.c
View file @
dfd351ef
...
...
@@ -94,11 +94,12 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
}
*
string
=
0
;
/* Get an idea of how much space we might need. */
size_bound
=
atoi
(
&
fmtcpy
[
1
])
+
50
;
size_bound
=
atoi
(
&
fmtcpy
[
1
]);
/* Avoid pitfall of negative "size" parameter ("%-200d"). */
if
(
size_bound
<
0
)
size_bound
=
-
size_bound
;
size_bound
+=
50
;
/* Make sure we have that much. */
if
(
size_bound
>
size_allocated
)
...
...
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