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:
+3
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user