memfiles compiles again on windows

This commit is contained in:
Araq
2013-05-20 03:09:28 +02:00
parent b0ad08013d
commit 5c91f6ff2c

View File

@@ -69,9 +69,7 @@ proc open*(filename: string, mode: TFileMode = fmRead,
0)
when useWinUnicode:
var f = allocWideCString(filename)
result.fHandle = callCreateFile(CreateFileW, f)
dealloc f
result.fHandle = callCreateFile(CreateFileW, newWideCString(filename))
else:
result.fHandle = callCreateFile(CreateFileA, filename)