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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
8582406d
Commit
8582406d
authored
7 years ago
by
Monster Iestyn
Committed by
Alam Ed Arias
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
prevent invalid nodes from crashing Net_CloseConnection, print a warning and return instead
parent
4008cae5
No related branches found
Branches containing commit
No related tags found
1 merge request
!179
Invalid node hotfix master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/d_net.c
+6
-0
6 additions, 0 deletions
src/d_net.c
with
6 additions
and
0 deletions
src/d_net.c
+
6
−
0
View file @
8582406d
...
@@ -716,6 +716,12 @@ void Net_CloseConnection(INT32 node)
...
@@ -716,6 +716,12 @@ void Net_CloseConnection(INT32 node)
if
(
!
node
)
if
(
!
node
)
return
;
return
;
if
(
node
>=
MAXNETNODES
)
// prevent invalid nodes from crashing the game
{
CONS_Alert
(
CONS_WARNING
,
M_GetText
(
"Net_CloseConnection: invalid node %d detected!
\n
"
),
node
);
return
;
}
nodes
[
node
].
flags
|=
NF_CLOSE
;
nodes
[
node
].
flags
|=
NF_CLOSE
;
// try to Send ack back (two army problem)
// try to Send ack back (two army problem)
...
...
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