2011/11/24 Francois Gouget fgouget@free.fr:
On Thu, 24 Nov 2011, Frédéric Delanoy wrote: [...]
- WCMD_output(newline);
- WCMD_output_asis(newline);
...
static const WCHAR newLine2[] = {'\n','\n','\0'};
- if (!bare) WCMD_output (newLine2);
- if (!bare) WCMD_output_asis (newLine2);
...
- WCMD_output(anykey);
- WCMD_output_asis(anykey);
No need to change those, since we control those strings, and those are generic strings with no '%' directive.
Sure these won't cause a crash if left as is.
But as you said we do control these strings and thus we know they don't need to go through wsprintf() and an extra string buffer before being passed on to WCMD_output_asis_*().
Also changing them to WCMD_output_asis_*() means fewer WCMD_output*() calls to audit for potential issues (not just '%' directives but also buffer size issues, etc).
So I think it's still very worthwhile to change them.
Right. You have a point. This patch may go in as is in that case.
Frédéric