From 3d9afa481fe5afc24034cd83815b8f6b12fcd77c Mon Sep 17 00:00:00 2001 From: Ted Green Date: Sun, 10 Feb 2019 19:11:26 -0700 Subject: [PATCH] smc91c9x: Pull sticky stringstream settings out of loop. (nw) --- src/devices/machine/smc91c9x.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/smc91c9x.cpp b/src/devices/machine/smc91c9x.cpp index 1a2c527b56c..359a69eefdb 100644 --- a/src/devices/machine/smc91c9x.cpp +++ b/src/devices/machine/smc91c9x.cpp @@ -291,9 +291,11 @@ void smc91c9x_device::dump_bytes(u8 *buf, int length) if (VERBOSE & LOG_PACKETS) { std::stringstream ss_bytes; + ss_bytes << std::hex << std::setfill('0'); for (int i = 0; i < length; i++) { - ss_bytes << std::hex << std::setw(2) << std::setfill('0') << (int) buf[i]; + ss_bytes << std::setw(2) << (int) buf[i]; + // Send newline every 16 bytes and at the end if ((i & 0xf) == 0xf || i == length - 1) { LOGMASKED(LOG_PACKETS, "%s\n", ss_bytes.str());