Mercurial > octave
changeset 26347:09a793a92c11 stable
help.cc: Fix static analyzer detected issues (bug #55347).
* help.cc (help_system::raw_help_from_docstrings_file): Correct conditional
test and look for '\n' OR '\r' as newline characters.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 01 Jan 2019 19:45:54 -0800 |
parents | fd890481c408 |
children | d9e7affb27c8 |
files | libinterp/corefcn/help.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/help.cc Wed Jan 02 03:52:55 2019 +0100 +++ b/libinterp/corefcn/help.cc Tue Jan 01 19:45:54 2019 -0800 @@ -630,7 +630,7 @@ // skip newline characters while (file && (c = file.get ()) != std::istream::traits_type::eof () - && c == '\n' && c == '\r') + && (c == '\n' || c == '\r')) ; // skip text file.unget ();