[project @ 1997-10-20 09:18:55 by simonm]
authorsimonm <unknown>
Mon, 20 Oct 1997 09:18:55 +0000 (09:18 +0000)
committersimonm <unknown>
Mon, 20 Oct 1997 09:18:55 +0000 (09:18 +0000)
fix reversed arguments to unpackNBytesST in getCurrentDirectory.

ghc/lib/required/Directory.lhs

index 719fe8b..d633b4a 100644 (file)
@@ -383,7 +383,7 @@ getCurrentDirectory =
     _ccall_ getCurrentDirectory            `thenIO_Prim` \ str ->
     if str /= ``NULL'' then
         _ccall_ strlen str             `thenIO_Prim` \ len ->
-        stToIO (unpackNBytesST len str)        >>=           \ pwd ->
+        stToIO (unpackNBytesST str len)        >>=           \ pwd ->
         _ccall_ free str               `thenIO_Prim` \ () ->
         return pwd
     else