Skip to content

Commit

Permalink
Update search_log.go
Browse files Browse the repository at this point in the history
Co-authored-by: Wenxuan <[email protected]>
  • Loading branch information
baurine and breezewish authored Jul 8, 2020
1 parent b3464a1 commit 650740f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions search_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ func readLastLines(file *os.File, endCursor int64) string {

var size int64 = 512
if cursor < size {
size = cursor
cursor = 0
} else {
cursor -= size
}
cursor -= size

file.Seek(cursor, io.SeekStart)
chars := make([]byte, size)
Expand Down

0 comments on commit 650740f

Please sign in to comment.