gofrontend: correct file reading logic in Stream_from_file
The implementation of Stream_from_file mishandled several cases:
* It reversed the check for whether bytes were already available in
the peek buffer.
* It considered positive return values from lseek to be an error, when
only a -1 return value indicates an error.
Reviewed-by: Ian Lance Taylor <email@example.com>
Trust: Cherry Zhang <firstname.lastname@example.org>
1 file changed