Mercurial > octave
changeset 27459:36b610122086
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 | 2f4e8dce06da |
children | 02500c701539 |
files | libinterp/corefcn/pr-output.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Sun Sep 29 17:50:52 2019 -0700 +++ b/libinterp/corefcn/pr-output.cc Sun Sep 29 20:22:12 2019 -0700 @@ -1367,9 +1367,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 (); @@ -2780,6 +2779,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 ())