r721 - trunk

black at icculus.org black at icculus.org
Tue May 23 15:42:08 EDT 2006


Author: black
Date: 2006-05-23 15:42:08 -0400 (Tue, 23 May 2006)
New Revision: 721

Modified:
   trunk/shell.c
Log:
Change the shell parser to not split up tokens into one value and one string token but
treat it as one token (as it should) - this is necessary for IP addresses to work correctly.


Modified: trunk/shell.c
===================================================================
--- trunk/shell.c	2006-05-15 02:14:50 UTC (rev 720)
+++ trunk/shell.c	2006-05-23 19:42:08 UTC (rev 721)
@@ -374,7 +374,11 @@
 		if( Shell_Parser_MatchChar( parser, '.' ) ) {
 			while( Shell_Parser_MatchDigit( parser ) );
 		}
-		return true;
+		// do not match e.g. 192.168.0.1 as 192.168|.0.1 but as one string
+		// TODO: maybe add an IP/DNS type to the console? This needs to be discussed.
+		if( IsWhitespace( *parser->currentChar ) ) {
+			return true;
+		}
 	}
 	return false;
 }




More information about the neither-commits mailing list