Disassembler: restore ostream state after changing it
Found by Coverity Scan, CID 25679. Change-Id: Ia0c175cd79ddc42ab9154c667db0d647618e41e2
This commit is contained in:
@ -55,7 +55,9 @@ int Disassembler::init(const char* path) {
|
|||||||
|
|
||||||
std::ostream& operator <<(std::ostream & os, const fail::Instruction & i) {
|
std::ostream& operator <<(std::ostream & os, const fail::Instruction & i) {
|
||||||
#ifndef __puma
|
#ifndef __puma
|
||||||
|
std::ios::fmtflags f(os.flags()); // save ostream state
|
||||||
os << std::hex << ((int)(i.address)) << "\t" << i.opcode << "\t" << i.instruction << "\t" << i.comment;
|
os << std::hex << ((int)(i.address)) << "\t" << i.opcode << "\t" << i.instruction << "\t" << i.comment;
|
||||||
|
os.flags(f); // restore ostream state
|
||||||
#endif
|
#endif
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user