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
c8c839a9
Commit
c8c839a9
authored
Aug 19, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userenv/tests: Don't depend on the Ascii length to find the next env variable.
parent
3cd91a45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
userenv.c
dlls/userenv/tests/userenv.c
+4
-2
No files found.
dlls/userenv/tests/userenv.c
View file @
c8c839a9
...
...
@@ -51,7 +51,8 @@ static BOOL get_env(const WCHAR * env, const char * var, char ** result)
varlen
=
strlen
(
var
);
do
{
envlen
=
WideCharToMultiByte
(
CP_ACP
,
0
,
p
,
-
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
)
-
1
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
p
,
-
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
))
buf
[
sizeof
(
buf
)
-
1
]
=
0
;
envlen
=
strlen
(
buf
);
if
(
CompareStringA
(
GetThreadLocale
(),
NORM_IGNORECASE
|
LOCALE_USE_CP_ACP
,
buf
,
min
(
envlen
,
varlen
),
var
,
varlen
)
==
CSTR_EQUAL
)
{
if
(
buf
[
varlen
]
==
'='
)
...
...
@@ -63,7 +64,8 @@ static BOOL get_env(const WCHAR * env, const char * var, char ** result)
return
TRUE
;
}
}
p
=
p
+
envlen
+
1
;
while
(
*
p
)
p
++
;
p
++
;
}
while
(
*
p
);
return
FALSE
;
}
...
...
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