Actually it's integer overflow![]()
No it's not. You were right.
Actually it's integer overflow![]()
case SortMethod.Size:
if (item1.FileInfo == null || item2.FileInfo == null)
{
if (sortAscending)
{
return (int)(item1.Duration - item2.Duration);
}
else
{
return (int)(item2.Duration - item1.Duration);
}
}
else
{
if (sortAscending)
{
return (int)(item1.FileInfo.Length - item2.FileInfo.Length);
}
else
{
return (int)(item2.FileInfo.Length - item1.FileInfo.Length);
}
}
Win32API.WIN32_FIND_DATA fd = new Win32API.WIN32_FIND_DATA();
fd.cFileName = new String(' ', 256);
fd.cAlternate = new String(' ', 14);
...
fi.Length = (((long)fd.nFileSizeHigh) << 32) + fd.nFileSizeLow;
private long length = 0;
public uint nFileSizeHigh;
public uint nFileSizeLow;
Thank you for confirming the bug. I wonder if same code is used for sorting the files in My Pictures, music and other modules, and if yes, then you know what to do!![]()
Thank you for confirming the bug. I wonder if same code is used for sorting the files in My Pictures, music and other modules, and if yes, then you know what to do!![]()