r542 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Mar 3 02:32:28 EST 2008


Author: icculus
Date: 2008-03-03 02:32:28 -0500 (Mon, 03 Mar 2008)
New Revision: 542

Modified:
   trunk/mojosetup.c
Log:
When splitting up text, trim whitespace from the left side of the line.


Modified: trunk/mojosetup.c
===================================================================
--- trunk/mojosetup.c	2008-03-03 07:24:10 UTC (rev 541)
+++ trunk/mojosetup.c	2008-03-03 07:32:28 UTC (rev 542)
@@ -831,7 +831,13 @@
             } // if
             else if ((ch == ' ') || (ch == '\t'))
             {
-                furthest = i;
+                if (i != 0)  // trim spaces from start of line...
+                    furthest = i;
+                else
+                {
+                    text++;
+                    i = -1;  // it'll be zero on next iteration.
+                } // else
             } // else if
         } // for
 




More information about the mojosetup-commits mailing list