diff --git a/Analyser/Static/Commodore/Disk.cpp b/Analyser/Static/Commodore/Disk.cpp index 2a72dcb54..0551fd997 100644 --- a/Analyser/Static/Commodore/Disk.cpp +++ b/Analyser/Static/Commodore/Disk.cpp @@ -216,34 +216,36 @@ std::vector Analyser::Static::Commodore::GetFiles(const std::shared_ptrdata[0]; - next_sector = sector->data[1]; + next_track = sector->data[0]; + next_sector = sector->data[1]; - if(is_first_sector) new_file.starting_address = uint16_t(sector->data[2]) | uint16_t(sector->data[3] << 8); - if(next_track) - new_file.data.insert( - new_file.data.end(), - sector->data.begin() + (is_first_sector ? 4 : 2), - sector->data.end() - ); - else - new_file.data.insert( - new_file.data.end(), - sector->data.begin() + 2, - sector->data.begin() + next_sector - ); + if(is_first_sector) new_file.starting_address = uint16_t(sector->data[2]) | uint16_t(sector->data[3] << 8); + if(next_track) + new_file.data.insert( + new_file.data.end(), + sector->data.begin() + (is_first_sector ? 4 : 2), + sector->data.end() + ); + else + new_file.data.insert( + new_file.data.end(), + sector->data.begin() + 2, + sector->data.begin() + next_sector + ); - is_first_sector = false; + is_first_sector = false; + } } if(!next_track) files.push_back(new_file); diff --git a/Analyser/Static/Commodore/File.cpp b/Analyser/Static/Commodore/File.cpp index 6e05e8bc4..6bcb9bfa6 100644 --- a/Analyser/Static/Commodore/File.cpp +++ b/Analyser/Static/Commodore/File.cpp @@ -23,7 +23,7 @@ bool Analyser::Static::Commodore::File::is_basic() { // ... null-terminated code ... // (with a next line address of 0000 indicating end of program) while(1) { - if(size_t(line_address - starting_address) >= data.size() - 2) break; + if(size_t(line_address - starting_address) + 1 >= data.size()) break; uint16_t next_line_address = data[line_address - starting_address]; next_line_address |= data[line_address - starting_address + 1] << 8; @@ -33,7 +33,7 @@ bool Analyser::Static::Commodore::File::is_basic() { } if(next_line_address < line_address + 5) break; - if(size_t(line_address - starting_address) >= data.size() - 5) break; + if(size_t(line_address - starting_address) + 3 >= data.size()) break; uint16_t next_line_number = data[line_address - starting_address + 2]; next_line_number |= data[line_address - starting_address + 3] << 8; diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme b/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme index c71db3eb0..bc950be25 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme +++ b/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme @@ -27,7 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" - enableAddressSanitizer = "YES" disableMainThreadChecker = "YES" codeCoverageEnabled = "YES">