mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
smc91c9x: Pull sticky stringstream settings out of loop. (nw)
This commit is contained in:
parent
5f9d5494c5
commit
3d9afa481f
@ -291,9 +291,11 @@ void smc91c9x_device::dump_bytes(u8 *buf, int length)
|
|||||||
if (VERBOSE & LOG_PACKETS)
|
if (VERBOSE & LOG_PACKETS)
|
||||||
{
|
{
|
||||||
std::stringstream ss_bytes;
|
std::stringstream ss_bytes;
|
||||||
|
ss_bytes << std::hex << std::setfill('0');
|
||||||
for (int i = 0; i < length; i++)
|
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)
|
if ((i & 0xf) == 0xf || i == length - 1)
|
||||||
{
|
{
|
||||||
LOGMASKED(LOG_PACKETS, "%s\n", ss_bytes.str());
|
LOGMASKED(LOG_PACKETS, "%s\n", ss_bytes.str());
|
||||||
|
Loading…
Reference in New Issue
Block a user