[Scummvm-cvs-logs] CVS: residual scene.cpp,1.10,1.11

James Brown ender at users.sourceforge.net
Wed Aug 20 01:12:03 CEST 2003


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv16232

Modified Files:
	scene.cpp 
Log Message:
Allow null-named lights


Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- scene.cpp	20 Aug 2003 07:44:54 -0000	1.10
+++ scene.cpp	20 Aug 2003 08:01:17 -0000	1.11
@@ -120,7 +120,14 @@
 
 void Scene::Light::load(TextSplitter &ts) {
   char buf[256];
-  ts.scanString(" light %256s", 1, buf);
+
+ // Light names can be null, but ts doesn't seem flexible enough to allow this
+ if (strlen(ts.currentLine()) > strlen(" light"))
+   ts.scanString(" light %256s", 1, buf);
+  else {
+   ts.nextLine();
+   strcpy(buf, "");
+  }
   name_ = buf;
 
   ts.scanString(" type %256s", 1, buf);





More information about the Scummvm-git-logs mailing list