Comment

Comment by userbinator

How does this happen? My guess is there is a loop that processes file contents in 8KB blocks, something like this:

    bytesRemaining = fileSize;
    while(...) {
        ...
        bytesRemaining -= 8192;
        if(bytesRemaining < 0)
            break;
        ...
    }
    bytesRemaining += 8192;
    ...
    // process remaining bytes

See the bug? :-)
parent userbinator 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton