StrPurge( char* text ): Fix incorrect behavior when string text is void.

Very minor enhancement in module edition dialogs.
Fix a minor bug in design rules editor: in Global Rules Edition: drill values > via diameter not checked
and the first item (track or via) in list was not checked (explains Bug 702177, that is not really a bug)
This commit is contained in:
jean-pierre charras
2011-01-16 13:49:58 +01:00
parent c4722e0f39
commit 2fd7f4ca14
5 changed files with 42 additions and 9 deletions
+3 -3
View File
@@ -37,8 +37,8 @@ int ReadDelimitedText( char* dest, char* source, int NbMaxChar )
}
/* Remove training spaces in text
* return a pointer on the first non space char in text
/* Remove leading and training spaces, tabs and end of line chars in text
* return a pointer on the first n char in text
*/
char* StrPurge( char* text )
{
@@ -46,7 +46,7 @@ char* StrPurge( char* text )
if( text )
{
while( strchr( whitespace, *text ) )
while( *text && strchr( whitespace, *text ) )
++text;
char* cp = text + strlen( text ) - 1;