Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LeoD
EDuke32
Commits
c17cfbf4
Commit
c17cfbf4
authored
Apr 19, 2022
by
Dino Bollinger
Committed by
Richard Gobeille
Apr 22, 2022
Browse files
Engine: Fix edge case where OSD_Printf() may wrongly remove the last char in a string
parent
b2e15923
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/build/src/osd.cpp
View file @
c17cfbf4
...
...
@@ -1686,11 +1686,9 @@ int OSD_Printf(const char *f, ...)
va_list
va
;
buf
=
(
char
*
)
Xrealloc
(
buf
,
(
size
<<=
1
));
va_start
(
va
,
f
);
len
=
Bvsnprintf
(
buf
,
size
-
1
,
f
,
va
);
len
=
Bvsnprintf
(
buf
,
size
,
f
,
va
);
va_end
(
va
);
}
while
((
unsigned
)
len
>
size
-
1
);
buf
[
len
]
=
0
;
}
while
((
unsigned
)
len
>=
size
);
OSD_Puts
(
buf
);
...
...
Write
Preview
Supports
Markdown
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