diff --git a/src/common/tv_filters/atari_ntsc_impl.h b/src/common/tv_filters/atari_ntsc_impl.h index 320d8081a..29b6d0715 100644 --- a/src/common/tv_filters/atari_ntsc_impl.h +++ b/src/common/tv_filters/atari_ntsc_impl.h @@ -263,7 +263,7 @@ static void init( init_t* impl, atari_ntsc_setup_t const* setup ) float* out = impl->to_rgb; int n; - //n = burst_count; FIXME: dead code detected by llvm scan-build + n = burst_count; // FIXME: dead code detected by llvm scan-build do { float const* in = decoder; diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index efe956c13..98675f210 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -568,15 +568,15 @@ bool CartDebug::removeLabel(const string& label) LabelToAddr::iterator iter = myUserAddresses.find(label); if(iter != myUserAddresses.end()) { - // Erase the label - myUserAddresses.erase(iter); - mySystem.setDirtyPage(iter->second); - - // And also erase the address assigned to it + // Erase the address assigned to the label AddrToLabel::iterator iter2 = myUserLabels.find(iter->second); if(iter2 != myUserLabels.end()) myUserLabels.erase(iter2); + // Erase the label itself + mySystem.setDirtyPage(iter->second); + myUserAddresses.erase(iter); + return true; } return false; @@ -737,7 +737,6 @@ string CartDebug::loadListFile() while(!in.eof()) { string line, addr_s; - int addr = -1; getline(in, line); @@ -749,6 +748,7 @@ string CartDebug::loadListFile() // Swallow first value, then get actual numerical value for address // We need to read the address as a string, since it may contain 'U' + int addr = -1; buf >> addr >> addr_s; if(addr_s.length() == 0) continue; diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index dd25d8d62..4e919cd05 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -208,7 +208,7 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod) scrollToCurrent(); int len = _promptEndPos - _promptStartPos; - if(len > 256) len = 256; + if(len > 255) len = 255; int lastDelimPos = -1; char delimiter = '\0'; diff --git a/src/tools/convbdf.c b/src/tools/convbdf.c index 8c71f93b5..7299fe598 100644 --- a/src/tools/convbdf.c +++ b/src/tools/convbdf.c @@ -984,6 +984,7 @@ int gen_c_source(struct font* pf, char *path) fontname); fprintf(ofp, "\n} // End of namespace GUI\n\n#endif\n"); + fcloise(ofp); return 0; }