Skip to content

Commit d1cb0d0

Browse files
andrewtappertjtsylve
authored andcommittedAug 17, 2016
Fix off-by-one calculating size of padding written upon timeout. (#17)
1 parent 88e830a commit d1cb0d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static void write_range(struct resource * res) {
222222

223223
if (timeout > 0 && ktime_to_ms(ktime_sub(end, start)) > timeout) {
224224
DBG("Reading is too slow. Skipping Range...");
225-
write_padding(res->end - i - is);
225+
write_padding(res->end - i + 1 - is);
226226
break;
227227
}
228228
}

0 commit comments

Comments
 (0)
Please sign in to comment.