Fix leading space bug

This commit is contained in:
Emil 2023-08-07 08:10:22 -06:00
parent ffb8c54644
commit 66da51c73f
No known key found for this signature in database
GPG Key ID: 5432DB986FDBCF8A
2 changed files with 7 additions and 6 deletions

View File

@ -68,16 +68,16 @@ remind(char * who)
/* " (@" IRC_BLUE "%s" IRC_GREEN ")" IRC_STOP, */
/* title, desc, repo)) */
if (-1 == asprintf(&r,
IRC_RED "%s: " IRC_YELLOW "%s" IRC_GREEN,
IRC_RED "%s: " IRC_YELLOW "%s" IRC_STOP,
title, desc))
{ /* this will probably never happen. But it implies a memory failure */
r = strdup(IRC_RED "No memory!" IRC_STOP);
}
}
else
{
r = strdup(IRC_RED "No current assignment." IRC_STOP);
}
}
return r;
}

View File

@ -174,8 +174,9 @@ has_arg(char const * cmd)
}
while (*cmd != '\0')
{
if (!isspace(*(++cmd)))
if (!isspace(*cmd))
{ return 1; }
++cmd;
}
return 0;
}