Skip to content

Commit

Permalink
S3-1: remove unnecessary offset calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Nov 20, 2024
1 parent c99f979 commit 0cf9acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/AVRValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ library AVRValidator {
}
} else if (chr == CHAR_COMMA) {
require(
allowedAdvisories[string(report[lastStart:lastStart + offset - lastStart - 1])] == FLAG_ALLOWED,
allowedAdvisories[string(report[lastStart:offset - 1])] == FLAG_ALLOWED,
"disallowed advisory is included"
);
} else if (chr == CHAR_LIST_END) {
if (offset - lastStart > 0) {
require(
allowedAdvisories[string(report[lastStart:lastStart + offset - lastStart - 1])] == FLAG_ALLOWED,
allowedAdvisories[string(report[lastStart:offset - 1])] == FLAG_ALLOWED,
"disallowed advisory is included"
);
}
Expand Down

0 comments on commit 0cf9acc

Please sign in to comment.