From acd3af86ab8d8440426d8b06acffa3c55d08f653 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 27 Oct 2026 23:23:13 -0400 Subject: [PATCH] modemm17: Restore ostream format after printing AX.25 PID Fix Coverity CID 655956 by saving and restoring the stream format flags around the hexadecimal PID output. This prevents the basefield setting from affecting subsequent output. Signed-off-by: Robin Getz --- modemm17/ax25_frame.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modemm17/ax25_frame.h b/modemm17/ax25_frame.h index 3a8d52388..111d0f0be 100644 --- a/modemm17/ax25_frame.h +++ b/modemm17/ax25_frame.h @@ -256,7 +256,9 @@ void write(std::ostream& os, const ax25_frame& frame) if (frame.pid()) { + std::ios_base::fmtflags flags = os.flags(); os << "PID: " << std::setbase(16) << int(frame.pid()) << std::endl; + os.flags(flags); } os << "Info: " << std::endl << frame.info() << std::endl; }