mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
MP Jingle: Buildbot fixes
This commit is contained in:
parent
f539ebf7a9
commit
a235d95d37
1 changed files with 12 additions and 2 deletions
|
|
@ -1336,8 +1336,18 @@ UINT32 S_GetMusicPosition(void)
|
||||||
/// In this section: mazmazz doesn't know how to do dynamic arrays or struct pointers!
|
/// In this section: mazmazz doesn't know how to do dynamic arrays or struct pointers!
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
|
// make the buildbots happy, because this safely zeroes out a struct
|
||||||
|
// https://stackoverflow.com/q/1538943
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||||
|
|
||||||
static const musicstack_t empty_music_stack_entry = {{0}};
|
static const musicstack_t empty_music_stack_entry = {{0}};
|
||||||
|
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
void S_SetStackAdjustmentStart(void)
|
void S_SetStackAdjustmentStart(void)
|
||||||
{
|
{
|
||||||
if (!pause_starttic)
|
if (!pause_starttic)
|
||||||
|
|
@ -1437,7 +1447,7 @@ static void S_AddMusicStackEntry(const char *mname, UINT16 mflags, boolean loopi
|
||||||
|
|
||||||
static musicstack_t S_GetMusicStackEntry(UINT16 status, boolean fromfirst, INT16 startindex)
|
static musicstack_t S_GetMusicStackEntry(UINT16 status, boolean fromfirst, INT16 startindex)
|
||||||
{
|
{
|
||||||
size_t i;
|
INT16 i;
|
||||||
|
|
||||||
// if the first entry is empty, force master onto it
|
// if the first entry is empty, force master onto it
|
||||||
// fixes a memory corruption bug
|
// fixes a memory corruption bug
|
||||||
|
|
@ -1469,7 +1479,7 @@ static musicstack_t S_GetMusicStackEntry(UINT16 status, boolean fromfirst, INT16
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = startindex; i >= 0; i--)
|
for (i = startindex; i >= 0; i--) // this line is why i is signed; otherwise, would wrap around to max value
|
||||||
{
|
{
|
||||||
if (!music_stack[i].status) // since we're counting down, we have to skip a few...
|
if (!music_stack[i].status) // since we're counting down, we have to skip a few...
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue