# HG changeset patch # User Rik # Date 1569813732 25200 # Node ID 36b61012208628217985a16273d98e04754407b5 # Parent 2f4e8dce06da1131fdf19bf06e7eaba56b286dbc Correctly display integer types with format hex (bug #56966). * pr-output.cc (pr_int): Set fill character to '0' on ostream before printing. diff -r 2f4e8dce06da -r 36b610122086 libinterp/corefcn/pr-output.cc --- 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 ())