https://bugs.winehq.org/show_bug.cgi?id=42602
Bug ID: 42602 Summary: ::CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct) bad sort compared to Windows Product: Wine Version: 2.3 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: martin@hinner.info Distribution: ---
Let's have this MFC code:
class CIconListBox : public CListBox
...
int CIconListBox::CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct) { CIconListBoxItem *Item1; CIconListBoxItem *Item2;
Item1=(CIconListBoxItem *)lpCompareItemStruct->itemData1; Item2=LastItem;
/* CompateItem is called immediately after AddString which does not contain any info for sorting. Pointer to data is set after AddString by calling SetItemDataPtr. This function thus relies on undocumented fact that Item2 is always last added item. Item1 has correct pointer.. */
//Item2=(CIconListBoxItem *)lpCompareItemStruct->itemData2;
//nejdriv rozhodne priorita if (Item1->m_sortprior>Item2->m_sortprior) return -1; if (Item1->m_sortprior<Item2->m_sortprior) return 1;
if (wcscmp(Item1->m_szItemName,Item2->m_szItemName)>0) return 1; else return -1; }
Result in Windows: sorted OK Result in Wine: reverse sorted.
I can provide app for testing. It is http://obdtester.com/downloads (e.g. BimCOM), password for download upon request by individual e-mail.
https://bugs.winehq.org/show_bug.cgi?id=42602
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- Confirming.
I've sent a fix for inclusion to wine-staging.
https://bugs.winehq.org/show_bug.cgi?id=42602
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Status|NEW |STAGED Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/user32-Sorted_ | |Listbox
https://bugs.winehq.org/show_bug.cgi?id=42602
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/user32-Sorted_ |er/patches/user32-Sorted_Li |Listbox |stbox
https://bugs.winehq.org/show_bug.cgi?id=42602
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Resolution|--- |FIXED Status|STAGED |RESOLVED Fixed by SHA1| |5c765431e2cdf5529713f321b70 | |645c9632529dd
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- Should be fixed by https://source.winehq.org/git/wine.git/commitdiff/5c765431e2cdf5529713f321b7...
https://bugs.winehq.org/show_bug.cgi?id=42602
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.12.
https://bugs.winehq.org/show_bug.cgi?id=42602
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=42602
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bugs included in 3.0.3.