]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Coverity: Restore output stream format
authorMatthew Barr <matthew.barr@intel.com>
Tue, 12 Jan 2016 03:48:35 +0000 (14:48 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 1 Mar 2016 00:23:56 +0000 (11:23 +1100)
src/util/dump_charclass.cpp

index 2cadc67a4f753fcbaa3ab24dbe34e48717cb3305..74b45414a95f296c137b331a710a48dae7392c6d 100644 (file)
@@ -72,8 +72,10 @@ void describeChar(ostream &os, char c, enum cc_output_t out_type) {
     } else if (c == 0x0d) {
         os << backslash << 'r';
     } else {
+        auto fmt(os.flags());
         os << backslash << 'x' << std::hex << std::setw(2)
-           << std::setfill('0') << (unsigned)(c & 0xff) << std::dec;
+           << std::setfill('0') << (unsigned)(c & 0xff);
+        os.flags(fmt);
     }
 }