Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jaden
SRB2
Commits
db2f8a50
Commit
db2f8a50
authored
8 years ago
by
toaster
Browse files
Options
Downloads
Patches
Plain Diff
Make sure that the number of files you're trying to add is properly considered!
parent
47e17125
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/d_netfil.c
+4
-1
4 additions, 1 deletion
src/d_netfil.c
with
4 additions
and
1 deletion
src/d_netfil.c
+
4
−
1
View file @
db2f8a50
...
@@ -331,6 +331,7 @@ INT32 CL_CheckFiles(void)
...
@@ -331,6 +331,7 @@ INT32 CL_CheckFiles(void)
char
wadfilename
[
MAX_WADPATH
];
char
wadfilename
[
MAX_WADPATH
];
INT32
ret
=
1
;
INT32
ret
=
1
;
size_t
packetsize
=
0
;
size_t
packetsize
=
0
;
size_t
filestoget
=
0
;
serverinfo_pak
*
dummycheck
=
NULL
;
serverinfo_pak
*
dummycheck
=
NULL
;
// Shut the compiler up.
// Shut the compiler up.
...
@@ -408,10 +409,12 @@ INT32 CL_CheckFiles(void)
...
@@ -408,10 +409,12 @@ INT32 CL_CheckFiles(void)
packetsize
+=
nameonlylength
(
fileneeded
[
i
].
filename
)
+
22
;
packetsize
+=
nameonlylength
(
fileneeded
[
i
].
filename
)
+
22
;
if
((
numwadfiles
>=
MAX_WADFILES
)
if
((
numwadfiles
+
filestoget
>=
MAX_WADFILES
)
||
(
packetsize
>
sizeof
(
dummycheck
->
fileneeded
)))
||
(
packetsize
>
sizeof
(
dummycheck
->
fileneeded
)))
return
3
;
return
3
;
filestoget
++
;
fileneeded
[
i
].
status
=
findfile
(
fileneeded
[
i
].
filename
,
fileneeded
[
i
].
md5sum
,
true
);
fileneeded
[
i
].
status
=
findfile
(
fileneeded
[
i
].
filename
,
fileneeded
[
i
].
md5sum
,
true
);
CONS_Debug
(
DBG_NETPLAY
,
"found %d
\n
"
,
fileneeded
[
i
].
status
);
CONS_Debug
(
DBG_NETPLAY
,
"found %d
\n
"
,
fileneeded
[
i
].
status
);
if
(
fileneeded
[
i
].
status
!=
FS_FOUND
)
if
(
fileneeded
[
i
].
status
!=
FS_FOUND
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment