Modules/FDDv2 - Added catch for zero-length read
authorJohn Hodge <[email protected]>
Tue, 8 Nov 2011 06:37:29 +0000 (14:37 +0800)
committerJohn Hodge <[email protected]>
Tue, 8 Nov 2011 06:37:29 +0000 (14:37 +0800)
- What is doing such small reads?

Modules/Storage/FDDv2/main.c

index 1119de8..bbe79f9 100644 (file)
@@ -174,6 +174,7 @@ Uint64 FDD_ReadFS(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
        if( Length > Node->Size )       Length = Node->Size;
        if( Offset + Length > Node->Size )
                Length = Node->Size - Offset;
+       if( Length == 0 )       return 0;
 
        rem_len = Length;
 

UCC git Repository :: git.ucc.asn.au