bug in news
John W. Eaton
jwe at octave.org
Thu Feb 5 16:20:03 CST 2009
On 5-Feb-2009, Thomas Treichl wrote:
| Petr Mikulik schrieb:
| > There is a small bug here:
| >
| > octave> version
| > ans = 3.1.51+
| >
| > octave> news
| >
| > ** Block comments
| > error: printf: invalid format specified
| > error: called from:
| > error: /opt/octave/octave-hg/share/octave/3.1.51+/m/miscellaneous/news.m
| > at line 32, column 7
|
| The attached changeset should do it, attributed to Petr.
It is a bug to pass an arbitrary string as the format for printf, and
Instead of trying to process the line to escape special characters, it
is better to use "printf ("%s", line)". But it is better still to use
"puts (line)", which avoids the overhead of processing the format string.
jwe
More information about the Bug-octave
mailing list