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
db497bdc
Commit
db497bdc
authored
Nov 22, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Nov 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Simplify concatenation of path and filename.
parent
56c0151f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
fdi.c
dlls/cabinet/fdi.c
+8
-10
No files found.
dlls/cabinet/fdi.c
View file @
db497bdc
...
@@ -2479,7 +2479,6 @@ BOOL __cdecl FDICopy(
...
@@ -2479,7 +2479,6 @@ BOOL __cdecl FDICopy(
FDICABINETINFO
fdici
;
FDICABINETINFO
fdici
;
FDINOTIFICATION
fdin
;
FDINOTIFICATION
fdin
;
INT_PTR
cabhf
,
filehf
=
0
;
INT_PTR
cabhf
,
filehf
=
0
;
int
idx
;
unsigned
int
i
;
unsigned
int
i
;
char
fullpath
[
MAX_PATH
];
char
fullpath
[
MAX_PATH
];
size_t
pathlen
,
filenamelen
;
size_t
pathlen
,
filenamelen
;
...
@@ -2503,8 +2502,8 @@ BOOL __cdecl FDICopy(
...
@@ -2503,8 +2502,8 @@ BOOL __cdecl FDICopy(
}
}
ZeroMemory
(
decomp_state
,
sizeof
(
fdi_decomp_state
));
ZeroMemory
(
decomp_state
,
sizeof
(
fdi_decomp_state
));
pathlen
=
(
pszCabPath
)
?
strlen
(
pszCabPath
)
:
0
;
pathlen
=
pszCabPath
?
strlen
(
pszCabPath
)
:
0
;
filenamelen
=
(
pszCabinet
)
?
strlen
(
pszCabinet
)
:
0
;
filenamelen
=
pszCabinet
?
strlen
(
pszCabinet
)
:
0
;
/* slight overestimation here to save CPU cycles in the developer's brain */
/* slight overestimation here to save CPU cycles in the developer's brain */
if
((
pathlen
+
filenamelen
+
3
)
>
MAX_PATH
)
{
if
((
pathlen
+
filenamelen
+
3
)
>
MAX_PATH
)
{
...
@@ -2515,12 +2514,11 @@ BOOL __cdecl FDICopy(
...
@@ -2515,12 +2514,11 @@ BOOL __cdecl FDICopy(
}
}
/* paste the path and filename together */
/* paste the path and filename together */
idx
=
0
;
fullpath
[
0
]
=
'\0'
;
if
(
pathlen
)
{
if
(
pathlen
)
for
(
i
=
0
;
i
<
pathlen
;
i
++
)
fullpath
[
idx
++
]
=
pszCabPath
[
i
];
strcpy
(
fullpath
,
pszCabPath
);
}
if
(
filenamelen
)
if
(
filenamelen
)
for
(
i
=
0
;
i
<
filenamelen
;
i
++
)
fullpath
[
idx
++
]
=
pszCabinet
[
i
];
strcat
(
fullpath
,
pszCabinet
);
fullpath
[
idx
]
=
'\0'
;
TRACE
(
"full cab path/file name: %s
\n
"
,
debugstr_a
(
fullpath
));
TRACE
(
"full cab path/file name: %s
\n
"
,
debugstr_a
(
fullpath
));
...
@@ -2540,7 +2538,7 @@ BOOL __cdecl FDICopy(
...
@@ -2540,7 +2538,7 @@ BOOL __cdecl FDICopy(
fdi
->
close
(
cabhf
);
fdi
->
close
(
cabhf
);
return
FALSE
;
return
FALSE
;
}
}
/* cabinet notification */
/* cabinet notification */
ZeroMemory
(
&
fdin
,
sizeof
(
FDINOTIFICATION
));
ZeroMemory
(
&
fdin
,
sizeof
(
FDINOTIFICATION
));
fdin
.
setID
=
fdici
.
setID
;
fdin
.
setID
=
fdici
.
setID
;
...
...
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