281302f: fix get_readable_ranges error handling [Glenn Maynard]

This commit is contained in:
AJ Kelly
2010-06-30 19:16:16 -05:00
parent 5679d7e797
commit 01afd64656
+2
View File
@@ -76,6 +76,8 @@ static int get_readable_ranges( const void **starts, const void **ends, int size
while( !eof && got < size-1 )
{
int ret = read( fd, file+file_used, sizeof(file) - file_used);
if( ret == -1 )
return false;
if( ret < int(sizeof(file)) - file_used)
eof = true;