From db46773ea19de4b8f54fceba3f15063e9f1b59df Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 25 May 2011 19:14:47 +0000 Subject: [PATCH] Fixed compile error WRT printf statements in Thumbulator, and fixed a potential segfault in CartDPC+. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2233 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/emucore/CartDPCPlus.cxx | 3 ++- src/emucore/Thumbulator.cxx | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx index 5ec6e1e55..d456125da 100644 --- a/src/emucore/CartDPCPlus.cxx +++ b/src/emucore/CartDPCPlus.cxx @@ -76,7 +76,8 @@ CartridgeDPCPlus::CartridgeDPCPlus(const uInt8* image, uInt32 size, // Initialize the DPC data fetcher registers for(uInt16 i = 0; i < 8; ++i) - myTops[i] = myBottoms[i] = myCounters[i] = myFractionalIncrements[i] = 0; + myTops[i] = myBottoms[i] = myCounters[i] = myFractionalIncrements[i] = + myFractionalCounters[i] = 0; // Set waveforms to first waveform entry myMusicWaveforms[0] = myMusicWaveforms[1] = myMusicWaveforms[2] = 0; diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx index b4a861a24..3334e5e39 100644 --- a/src/emucore/Thumbulator.cxx +++ b/src/emucore/Thumbulator.cxx @@ -236,10 +236,9 @@ void Thumbulator::write32 ( uInt32 addr, uInt32 data ) switch(addr) { case 0xE0000000: - if(DISS) printf("uart: ["); - printf("%c",data&0xFF); - if(DISS) printf("]\n"); - fflush(stdout); + if(DISS) statusMsg << "uart: ["; + statusMsg << char(data&0xFF); + if(DISS) statusMsg << "]" << endl; break; } return;