Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential infinite loop in S_PaintChannels
when playing sounds with loop start >= end (e.g. misc/forcefield.wav from Madfox's kaptlog.zip)
- Loading branch information
b20c27b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sezero @j0zzz This affects QS and JoeQuake as well. You can repro it by unzipping this file into your id1 dir and running
play forcefield
in the console, the game will become unresponsive.b20c27b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but should this not be done in
GetWavinfo
? Because, if we hit this,info.samples
will most likely stay miscalculated inGetWavInfo()
.b20c27b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. I suggest the following on top of this patch: what do you think?
b20c27b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I'd move the fix a bit lower, though, after the
if (info.samples)
block, sinceinfo.samples
gets overwritten in theelse
branch.b20c27b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force-pushed 3f41b0d, with the new location.
b20c27b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged the fix to joequake, thx for the heads up!