Skip to content

Commit

Permalink
Fix off-by-one calculating size of padding written upon timeout. (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtappert authored and jtsylve committed Aug 17, 2016
1 parent 88e830a commit d1cb0d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static void write_range(struct resource * res) {

if (timeout > 0 && ktime_to_ms(ktime_sub(end, start)) > timeout) {
DBG("Reading is too slow. Skipping Range...");
write_padding(res->end - i - is);
write_padding(res->end - i + 1 - is);
break;
}
}
Expand Down

0 comments on commit d1cb0d0

Please sign in to comment.