Mercurial > octave
diff libinterp/corefcn/pr-output.cc @ 27462:730af4e7034a stable
Correctly display integer types with format hex (bug #56966).
* pr-output.cc (pr_int): Set fill character to '0' on ostream before printing.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 29 Sep 2019 20:22:12 -0700 |
parents | ecc16b72bfb3 |
children | 94d278b130d1 |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Sat Jun 01 19:30:56 2019 +0200 +++ b/libinterp/corefcn/pr-output.cc Sun Sep 29 20:22:12 2019 -0700 @@ -1311,9 +1311,8 @@ // Unless explicitly asked for, always print in big-endian format. - // FIXME: will bad things happen if we are - // interrupted before resetting the format flags and fill - // character? + // FIXME: Will bad things happen if we are interrupted before resetting + // the format flags and fill character? octave::mach_info::float_format flt_fmt = octave::mach_info::native_float_format (); @@ -2721,6 +2720,7 @@ { octave::preserve_stream_state stream_state (os); + os.fill ('0'); os.flags (std::ios::right | std::ios::hex); if (hex_format > 1 || octave::mach_info::words_big_endian ())