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
9032849d
Commit
9032849d
authored
May 17, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Avoid some fatal errors.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d321cdcd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
registry.c
programs/wineconsole/registry.c
+1
-1
user.c
programs/wineconsole/user.c
+2
-3
wineconsole.c
programs/wineconsole/wineconsole.c
+2
-6
No files found.
programs/wineconsole/registry.c
View file @
9032849d
...
@@ -76,7 +76,7 @@ static LPWSTR WINECON_CreateKeyName(LPCWSTR kn)
...
@@ -76,7 +76,7 @@ static LPWSTR WINECON_CreateKeyName(LPCWSTR kn)
LPWSTR
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
kn
)
+
1
)
*
sizeof
(
WCHAR
));
LPWSTR
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
kn
)
+
1
)
*
sizeof
(
WCHAR
));
LPWSTR
ptr
=
ret
;
LPWSTR
ptr
=
ret
;
if
(
!
ptr
)
WINECON_Fatal
(
"OOM"
)
;
if
(
!
ret
)
return
NULL
;
do
do
{
{
...
...
programs/wineconsole/user.c
View file @
9032849d
...
@@ -56,8 +56,7 @@ static void WCUSER_FillMemDC(const struct inner_data* data, int upd_tp, int upd_
...
@@ -56,8 +56,7 @@ static void WCUSER_FillMemDC(const struct inner_data* data, int upd_tp, int upd_
/* FIXME: could set up a mechanism to reuse the line between different
/* FIXME: could set up a mechanism to reuse the line between different
* calls to this function
* calls to this function
*/
*/
if
(
!
(
line
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
->
curcfg
.
sb_width
*
sizeof
(
WCHAR
))))
if
(
!
(
line
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
->
curcfg
.
sb_width
*
sizeof
(
WCHAR
))))
return
;
WINECON_Fatal
(
"OOM
\n
"
);
dx
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
->
curcfg
.
sb_width
*
sizeof
(
*
dx
)
);
dx
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
->
curcfg
.
sb_width
*
sizeof
(
*
dx
)
);
hOldFont
=
SelectObject
(
PRIVATE
(
data
)
->
hMemDC
,
PRIVATE
(
data
)
->
hFont
);
hOldFont
=
SelectObject
(
PRIVATE
(
data
)
->
hMemDC
,
PRIVATE
(
data
)
->
hFont
);
...
@@ -169,7 +168,7 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL
...
@@ -169,7 +168,7 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL
w16b
=
((
data
->
curcfg
.
cell_width
+
15
)
&
~
15
)
/
8
;
w16b
=
((
data
->
curcfg
.
cell_width
+
15
)
&
~
15
)
/
8
;
ptr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
w16b
*
data
->
curcfg
.
cell_height
);
ptr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
w16b
*
data
->
curcfg
.
cell_height
);
if
(
!
ptr
)
WINECON_Fatal
(
"OOM"
)
;
if
(
!
ptr
)
return
;
nbl
=
max
((
data
->
curcfg
.
cell_height
*
size
)
/
100
,
1
);
nbl
=
max
((
data
->
curcfg
.
cell_height
*
size
)
/
100
,
1
);
for
(
j
=
data
->
curcfg
.
cell_height
-
nbl
;
j
<
data
->
curcfg
.
cell_height
;
j
++
)
for
(
j
=
data
->
curcfg
.
cell_height
-
nbl
;
j
<
data
->
curcfg
.
cell_height
;
j
++
)
{
{
...
...
programs/wineconsole/wineconsole.c
View file @
9032849d
...
@@ -655,11 +655,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
...
@@ -655,11 +655,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
GetStartupInfoW
(
&
si
);
GetStartupInfoW
(
&
si
);
if
(
pid
==
0
)
if
(
pid
==
0
)
appname
=
si
.
lpTitle
;
{
if
(
!
si
.
lpTitle
)
WINECON_Fatal
(
"Should have a title set"
);
appname
=
si
.
lpTitle
;
}
data
->
nCmdShow
=
nCmdShow
;
data
->
nCmdShow
=
nCmdShow
;
/* load settings */
/* load settings */
...
@@ -729,7 +725,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
...
@@ -729,7 +725,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
WINECON_GetServerConfig
(
data
);
WINECON_GetServerConfig
(
data
);
data
->
cells
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
data
->
cells
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
data
->
curcfg
.
sb_width
*
data
->
curcfg
.
sb_height
*
sizeof
(
CHAR_INFO
));
data
->
curcfg
.
sb_width
*
data
->
curcfg
.
sb_height
*
sizeof
(
CHAR_INFO
));
if
(
!
data
->
cells
)
WINECON_Fatal
(
"OOM
\n
"
)
;
if
(
!
data
->
cells
)
goto
error
;
data
->
fnResizeScreenBuffer
(
data
);
data
->
fnResizeScreenBuffer
(
data
);
data
->
fnComputePositions
(
data
);
data
->
fnComputePositions
(
data
);
WINECON_SetConfig
(
data
,
&
cfg
);
WINECON_SetConfig
(
data
,
&
cfg
);
...
...
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