Fixed bad handling of VFS_AllocHandle_
[tpg/acess2.git] / Kernel / vfs / open.c
index 9aeca95..51d7885 100644 (file)
@@ -510,7 +510,7 @@ int VFS_Open(const char *Path, Uint Mode)
        }
        
        i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode );
-       if( i > 0 ) {
+       if( i >= 0 ) {
                LEAVE('x', i);
                return i;
        }
@@ -570,7 +570,7 @@ int VFS_OpenChild(Uint *Errno, int FD, const char *Name, Uint Mode)
        }
        
        i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode );
-       if( i > 0 ) {
+       if( i >= 0 ) {
                LEAVE('x', i);
                return i;
        }

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