Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
34d17c9e
Commit
34d17c9e
authored
May 23, 2010
by
Marcus Meissner
Committed by
Alexandre Julliard
May 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: qsort: comparator must not get the same pointer.
parent
6f358ef8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
misc.c
dlls/ntdll/misc.c
+1
-1
string.c
dlls/ntdll/tests/string.c
+3
-0
No files found.
dlls/ntdll/misc.c
View file @
34d17c9e
...
...
@@ -272,7 +272,7 @@ NTDLL_mergesort( void *arr, void *barr, int elemsize, int(__cdecl *compar)(const
for
(
k
=
left
;
k
<=
right
;
k
++
)
{
/*arr[k]=(barr[i]<barr[j])?barr[i++]:barr[j--];*/
if
(
compar
(
X
(
barr
,
i
),
X
(
barr
,
j
))
<
0
)
{
if
(
i
!=
j
&&
compar
(
X
(
barr
,
i
),
X
(
barr
,
j
))
<
0
)
{
memcpy
(
X
(
arr
,
k
),
X
(
barr
,
i
),
elemsize
);
i
++
;
}
else
{
...
...
dlls/ntdll/tests/string.c
View file @
34d17c9e
...
...
@@ -1145,16 +1145,19 @@ static void test_wcsrchr(void)
static
__cdecl
int
intcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
(
*
(
int
*
)
a
)
-
(
*
(
int
*
)
b
);
}
static
__cdecl
int
charcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
(
*
(
char
*
)
a
)
-
(
*
(
char
*
)
b
);
}
static
__cdecl
int
strcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
lstrcmpA
(
*
(
char
**
)
a
,
*
(
char
**
)
b
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment