Skip to content

Commit

Permalink
Change invalid sndinfo definition to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kraflab committed Nov 18, 2023
1 parent 8994a52 commit f4b747e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion prboom2/src/dsda/ambient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@ static void dsda_ParseSndInfoLine(Scanner &scanner) {
std::string name(scanner.string);

scanner.CheckToken('='); // Optional
scanner.MustGetString();

if (!scanner.CheckString()) {
lprintf(LO_WARN, "Invalid SNDINFO: name \"%s\" expects string sound lump\n", name.c_str());

scanner.GetNextToken();
scanner.SkipLine();
return;
}

if (!W_LumpNameExists(scanner.string)) {
lprintf(LO_WARN, "Sound lump \"%s\" does not exist\n", scanner.string);
Expand Down

0 comments on commit f4b747e

Please sign in to comment.