bug in news

Thomas Treichl Thomas.Treichl at gmx.net
Sat Feb 7 13:05:44 CST 2009


John W. Eaton schrieb:
> 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.

Ah yes, I see, thanks,

   Thomas


More information about the Bug-octave mailing list