1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-09 01:45:48 +01:00

Fixed wtrimspace() whih had wrong behavior.

This commit is contained in:
dan
2000-10-25 22:41:03 +00:00
parent e215328d81
commit 99ce8b2d85

View File

@@ -162,15 +162,15 @@ wtrimspace(char *s)
{
char *t;
char *c;
while (isspace(*s) && *s) s++;
t = s+strlen(s);
t = s+strlen(s)-1;
while (t > s && isspace(*t)) t--;
c = wmalloc(t-s + 1);
memcpy(c, s, t-s);
c[t-s] = 0;
c = wmalloc(t-s+2);
memcpy(c, s, t-s+1);
c[t-s+1] = 0;
return c;
}