Fix bug #77 - Error in ACL command parsing.

This commit is contained in:
Jan Vidar Krey
2009-08-31 19:39:09 +02:00
parent aeba7188c0
commit 1e380ecf0f
2 changed files with 12 additions and 17 deletions

View File

@@ -45,12 +45,15 @@ static int is_printable(unsigned char c)
char* strip_white_space(char* string)
{
char* pos;
if (!string)
return "";
while (string[0] && is_white_space(string[0])) string++;
if (!*string)
return 0;
return string;
/* Strip appending whitespace */
pos = &string[strlen(string)-1];
while (&string[0] < &pos[0] && is_white_space(pos[0])) { pos[0] = 0; pos--; }