Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
370b881f
Commit
370b881f
authored
Oct 16, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Oct 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid setting IS_TEXT_UNICODE_NUL_BYTES for the last byte of an ANSI string.
parent
323f09b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
rtlstr.c
dlls/ntdll/rtlstr.c
+3
-0
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+1
-1
No files found.
dlls/ntdll/rtlstr.c
View file @
370b881f
...
...
@@ -1610,6 +1610,9 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf )
/* Check for an odd length ... pass if even. */
if
(
len
&
1
)
out_flags
|=
IS_TEXT_UNICODE_ODD_LENGTH
;
if
(((
char
*
)
buf
)[
len
-
1
]
==
0
)
len
--
;
/* Windows seems to do something like that to avoid e.g. false IS_TEXT_UNICODE_NULL_BYTES */
len
/=
sizeof
(
WCHAR
);
/* Windows only checks the first 256 characters */
if
(
len
>
256
)
len
=
256
;
...
...
dlls/ntdll/tests/rtlstr.c
View file @
370b881f
...
...
@@ -1677,7 +1677,7 @@ static void test_RtlIsTextUnicode(void)
int
flags
;
int
i
;
todo_wine
ok
(
!
pRtlIsTextUnicode
(
ascii
,
sizeof
(
ascii
),
NULL
),
"ASCII text detected as Unicode
\n
"
);
ok
(
!
pRtlIsTextUnicode
(
ascii
,
sizeof
(
ascii
),
NULL
),
"ASCII text detected as Unicode
\n
"
);
ok
(
pRtlIsTextUnicode
(
unicode
,
sizeof
(
unicode
),
NULL
),
"Text should be Unicode
\n
"
);
ok
(
!
pRtlIsTextUnicode
(
unicode
,
sizeof
(
unicode
)
-
1
,
NULL
),
"Text should be Unicode
\n
"
);
...
...
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