File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -749,9 +749,8 @@ sfxinfo_t *SoundEngine::LoadSound(sfxinfo_t *sfx)
749
749
{
750
750
auto sfxp = sfxdata.data ();
751
751
int32_t dmxlen = LittleLong (((int32_t *)sfxp)[1 ]);
752
-
753
752
// If the sound is voc, use the custom loader.
754
- if (memcmp (sfxp, " Creative Voice File" , 19 ) == 0 )
753
+ if (size > 19 && memcmp (sfxp, " Creative Voice File" , 19 ) == 0 )
755
754
{
756
755
sfx->data = GSnd->LoadSoundVoc (sfxp, size);
757
756
}
Original file line number Diff line number Diff line change @@ -171,22 +171,22 @@ void D_LoadWadSettings ()
171
171
172
172
while (conf < eof)
173
173
{
174
- size_t i;
174
+ size_t i = 0 ;
175
175
176
176
// Fetch a line to execute
177
177
command.Clear ();
178
178
for (i = 0 ; conf + i < eof && conf[i] != ' \n ' ; ++i)
179
179
{
180
180
command.Push (conf[i]);
181
181
}
182
- if (i == 0 )
182
+ if (i == 0 ) // Blank line
183
183
{
184
184
conf++;
185
185
continue ;
186
186
}
187
187
command.Push (0 );
188
188
conf += i;
189
- if (*conf == ' \n ' )
189
+ if (conf >= eof || *conf == ' \n ' )
190
190
{
191
191
conf++;
192
192
}
You can’t perform that action at this time.
0 commit comments