- fixed: The #include command in DECORATE always tried to look up the name

as a normal WAD lump name. It only should do that if the name is not longer
  than 8 characters and doesn't contain any '/'-characters.

SVN r546 (trunk)
This commit is contained in:
Christoph Oelckers 2007-09-23 08:02:57 +00:00
parent e8875041ca
commit f62032ac6a
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,8 @@
September 23, 2007 (Changes by Graf Zahl)
- fixed: The #include command in DECORATE always tried to look up the name
as a normal WAD lump name. It only should do that if the name is not longer
than 8 characters and doesn't contain any '/'-characters.
September 11, 2007 (Changes by Graf Zahl)
- fixed: The Timidity player didn't close its temporary files and left them
behind because it couldn't delete them.

View File

@ -88,8 +88,15 @@ static void ParseDecorate ()
SC_MustGetString();
// This is not using SC_Open because it can print a more useful error message when done here
lump = Wads.CheckNumForFullName(sc_String);
if (lump==-1) lump = Wads.CheckNumForName(sc_String);
if (lump==-1) SC_ScriptError("Lump '%s' not found", sc_String);
// Try a normal WAD name lookup only if it's a proper name without path separator and
// not longer than 8 characters.
if (lump==-1 && strlen(sc_String) <= 8 && !strchr(sc_String, '/'))
lump = Wads.CheckNumForName(sc_String);
if (lump==-1)
SC_ScriptError("Lump '%s' not found", sc_String);
SC_SaveScriptState();
SC_OpenLumpNum(lump, sc_String);
recursion++;