Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e8dda01

Browse files
[[ Bug 14110 ]] An StdioFilehandle should be created if not MemoryMappedFile can
1 parent 041406c commit e8dda01

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

docs/notes/bugfix-14110.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Cannot open file on a file of size zero

engine/src/dskw32.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3169,6 +3169,10 @@ struct MCWindowsDesktop: public MCSystemInterface, public MCWindowsSystemService
31693169
CloseHandle(t_file_handle);
31703170
}
31713171
}
3172+
// SN-2014-11-27: [[ Bug 14110 ]] A StdioFileHandle should be created if the file mapping failed
3173+
// (for empty files for instance).
3174+
else
3175+
t_handle = new MCStdioFileHandle((MCWinSysHandle)t_file_handle);
31723176
}
31733177
else
31743178
t_handle = new MCStdioFileHandle((MCWinSysHandle)t_file_handle);

0 commit comments

Comments
 (0)