Skip to content

Commit

Permalink
fix swab
Browse files Browse the repository at this point in the history
  • Loading branch information
takenori-y committed Sep 12, 2023
1 parent 224ea23 commit 3b32c62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/swab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ int main(int argc, char* argv[]) {
}
}

if (end_address < start_address) {
if (kMagicNumberForEnd != end_address && end_address < start_address) {
std::ostringstream error_message;
error_message << "End address must be equal to or greater than "
<< "start address";
sptk::PrintErrorMessage("swab", error_message);
return 1;
}

if (end_offset < start_offset) {
if (kMagicNumberForEnd != end_offset && end_offset < start_offset) {
std::ostringstream error_message;
error_message << "End offset number must be equal to or greater than "
<< "start offset number";
Expand Down

0 comments on commit 3b32c62

Please sign in to comment.