diff options
Diffstat (limited to 'plugins/MirLua/src/m_windows.cpp')
-rw-r--r-- | plugins/MirLua/src/m_windows.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_windows.cpp b/plugins/MirLua/src/m_windows.cpp index c42be30335..b78f9f7278 100644 --- a/plugins/MirLua/src/m_windows.cpp +++ b/plugins/MirLua/src/m_windows.cpp @@ -121,12 +121,16 @@ static int lua_FindIterator(lua_State *L) return lua_FindIterator(L);
}
+ LARGE_INTEGER size;
+ size.HighPart = ffd.nFileSizeHigh;
+ size.LowPart = ffd.nFileSizeLow;
+
lua_newtable(L);
lua_pushliteral(L, "Name");
lua_pushstring(L, T2Utf(ffd.cFileName));
lua_settable(L, -3);
lua_pushliteral(L, "Size");
- lua_pushinteger(L, (ffd.nFileSizeHigh * (MAXDWORD + 1)) + ffd.nFileSizeLow);
+ lua_pushinteger(L, size.QuadPart);
lua_settable(L, -3);
lua_pushliteral(L, "IsFile");
lua_pushboolean(L, !(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY));
|