Revision: 8047
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8047&view=rev
Author:   thjc
Date:     2009-07-17 05:39:05 +0000 (Fri, 17 Jul 2009)

Log Message:
-----------
fix buffer underrun on empty line in rgb.txt (as per bug 2794444)

Modified Paths:
--------------
    code/stage/trunk/libstage/color.cc

Modified: code/stage/trunk/libstage/color.cc
===================================================================
--- code/stage/trunk/libstage/color.cc  2009-07-17 02:01:20 UTC (rev 8046)
+++ code/stage/trunk/libstage/color.cc  2009-07-17 05:39:05 UTC (rev 8047)
@@ -56,7 +56,8 @@
                        break;
 
                        // it's a macro or comment line - ignore the line
-                       if (line[0] == '!' || line[0] == '#' || line[0] == '%') 
+                       // also ignore empty lines
+                       if (line[0] == '!' || line[0] == '#' || line[0] == '%' 
|| line[0] == '\0') 
                                continue;
 
                        // Trim the trailing space


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to