[Bug 42602] New: ::CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct) bad sort compared to Windows
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(a)winehq.org Reporter: martin(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- Confirming. I've sent a fix for inclusion to wine-staging. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry(a)baikal.ru, | |erich.e.hoover(a)wine-staging | |.com, michael(a)fds-team.de, | |sebastian(a)fds-team.de Status|NEW |STAGED Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/user32-Sorted_ | |Listbox -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)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 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com Resolution|--- |FIXED Status|STAGED |RESOLVED Fixed by SHA1| |5c765431e2cdf5529713f321b70 | |645c9632529dd --- Comment #2 from Zebediah Figura <z.figura12(a)gmail.com> --- Should be fixed by https://source.winehq.org/git/wine.git/commitdiff/5c765431e2cdf5529713f321b7... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 3.12. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42602 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |--- --- Comment #4 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 3.0.x milestone from bugs included in 3.0.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org