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
f09f03a7
Commit
f09f03a7
authored
Feb 17, 2008
by
Marcus Meissner
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Handle error returns from ImmGetCompositionString.
parent
2ef077e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
edit.c
dlls/user32/edit.c
+13
-13
No files found.
dlls/user32/edit.c
View file @
f09f03a7
...
...
@@ -5347,7 +5347,7 @@ static void EDIT_UpdateText(EDITSTATE *es, const RECT *rc, BOOL bErase)
static
void
EDIT_GetCompositionStr
(
HWND
hwnd
,
LPARAM
CompFlag
,
EDITSTATE
*
es
)
{
DWORD
dwBufL
en
;
LONG
bufl
en
;
LPWSTR
lpCompStr
=
NULL
;
HIMC
hIMC
;
LPSTR
lpCompStrAttr
=
NULL
;
...
...
@@ -5356,15 +5356,15 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
if
(
!
(
hIMC
=
ImmGetContext
(
hwnd
)))
return
;
dwBufL
en
=
ImmGetCompositionStringW
(
hIMC
,
GCS_COMPSTR
,
NULL
,
0
);
bufl
en
=
ImmGetCompositionStringW
(
hIMC
,
GCS_COMPSTR
,
NULL
,
0
);
if
(
dwBufL
en
<
0
)
if
(
bufl
en
<
0
)
{
ImmReleaseContext
(
hwnd
,
hIMC
);
return
;
}
lpCompStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufL
en
+
sizeof
(
WCHAR
));
lpCompStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
bufl
en
+
sizeof
(
WCHAR
));
if
(
!
lpCompStr
)
{
ERR
(
"Unable to allocate IME CompositionString
\n
"
);
...
...
@@ -5372,9 +5372,9 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
return
;
}
if
(
dwBufL
en
)
ImmGetCompositionStringW
(
hIMC
,
GCS_COMPSTR
,
lpCompStr
,
dwBufL
en
);
lpCompStr
[
dwBufL
en
/
sizeof
(
WCHAR
)]
=
0
;
if
(
bufl
en
)
ImmGetCompositionStringW
(
hIMC
,
GCS_COMPSTR
,
lpCompStr
,
bufl
en
);
lpCompStr
[
bufl
en
/
sizeof
(
WCHAR
)]
=
0
;
if
(
CompFlag
&
GCS_COMPATTR
)
{
...
...
@@ -5427,21 +5427,21 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
static
void
EDIT_GetResultStr
(
HWND
hwnd
,
EDITSTATE
*
es
)
{
DWORD
dwBufL
en
;
LONG
bufl
en
;
LPWSTR
lpResultStr
;
HIMC
hIMC
;
if
(
!
(
hIMC
=
ImmGetContext
(
hwnd
)))
return
;
dwBufL
en
=
ImmGetCompositionStringW
(
hIMC
,
GCS_RESULTSTR
,
NULL
,
0
);
if
(
dwBufL
en
<=
0
)
bufl
en
=
ImmGetCompositionStringW
(
hIMC
,
GCS_RESULTSTR
,
NULL
,
0
);
if
(
bufl
en
<=
0
)
{
ImmReleaseContext
(
hwnd
,
hIMC
);
return
;
}
lpResultStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufL
en
+
sizeof
(
WCHAR
));
lpResultStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
bufl
en
+
sizeof
(
WCHAR
));
if
(
!
lpResultStr
)
{
ERR
(
"Unable to alloc buffer for IME string
\n
"
);
...
...
@@ -5449,8 +5449,8 @@ static void EDIT_GetResultStr(HWND hwnd, EDITSTATE *es)
return
;
}
ImmGetCompositionStringW
(
hIMC
,
GCS_RESULTSTR
,
lpResultStr
,
dwBufL
en
);
lpResultStr
[
dwBufL
en
/
sizeof
(
WCHAR
)]
=
0
;
ImmGetCompositionStringW
(
hIMC
,
GCS_RESULTSTR
,
lpResultStr
,
bufl
en
);
lpResultStr
[
bufl
en
/
sizeof
(
WCHAR
)]
=
0
;
/* check for change in composition start */
if
(
es
->
selection_end
<
es
->
composition_start
)
...
...
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