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 <firstname.lastname@example.org>
Trust: Cherry Zhang <email@example.com>
1 file changed