Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
EDuke32
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Richard Gobeille
EDuke32
Merge requests
!194
Duke3D: Check that the sound index is nonnegative in S_SoundIsValid.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Duke3D: Check that the sound index is nonnegative in S_SoundIsValid.
sound_crash_fix
into
master
Overview
1
Commits
1
Changes
1
Closed
NY00123
requested to merge
sound_crash_fix
into
master
3 years ago
Overview
1
Commits
1
Changes
1
Expand
This fixes a crash when pressing on a switch with a negative hitag.
switch_nosound_test.map
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
f871c698
1 commit,
3 years ago
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
source/duke3d/src/sounds.h
+
1
−
1
Options
@@ -77,7 +77,7 @@ extern int32_t MusicIsWaveform, MusicVoice;
static
FORCE_INLINE
bool
S_SoundIsValid
(
int
soundNum
)
{
return
soundNum
<=
g_highestSoundIdx
&&
g_sounds
[
soundNum
]
&&
g_sounds
[
soundNum
]
!=
&
nullsound
&&
g_sounds
[
soundNum
]
->
ptr
;
return
soundNum
>=
0
&&
soundNum
<=
g_highestSoundIdx
&&
g_sounds
[
soundNum
]
&&
g_sounds
[
soundNum
]
!=
&
nullsound
&&
g_sounds
[
soundNum
]
->
ptr
;
}
static
FORCE_INLINE
bool
S_IsAmbientSFX
(
int
const
spriteNum
)
{
return
(
sprite
[
spriteNum
].
picnum
==
MUSICANDSFX
&&
sprite
[
spriteNum
].
lotag
<
999
);
}
Loading