fixed issue #2129 , Negative seek offset

This commit is contained in:
agapple
2019-09-03 08:51:21 +08:00
parent 403fdf997c
commit ecdab76705

View File

@@ -28,10 +28,13 @@ public class FileUtils {
minIndex = 0; minIndex = 0;
} }
String line; if (readIndex < 0) {
readIndex = 0;
}
rf.seek(readIndex); rf.seek(readIndex);
int k = 0; int k = 0;
int c = -1; int c = -1;
String line = null;
while (readIndex > start) { while (readIndex > start) {
if (k == l) { if (k == l) {
break; break;