X-Git-Url: https://git.armaanb.net/?p=sic.git;a=blobdiff_plain;f=util.c;fp=util.c;h=0869cca08401a08f53878653f3a37d5bf0d6a12f;hp=25678120422eea5ec0782e9040fdd5ad24b9ff45;hb=d9bda20849c464eff0adb56414da1840abc6ef6a;hpb=df4c0611366bf361fa263fbc57009cbe68456855 diff --git a/util.c b/util.c index 2567812..0869cca 100644 --- a/util.c +++ b/util.c @@ -42,7 +42,7 @@ dial(char *host, char *port) { static char * eat(char *s, int (*p)(int), int r) { - while(*s != '\0' && p(*s) == r) + while(*s != '\0' && p((unsigned char)*s) == r) s++; return s; } @@ -61,7 +61,7 @@ trim(char *s) { char *e; e = s + strlen(s) - 1; - while(e > s && isspace(*e)) + while(e > s && isspace((unsigned char)*e)) e--; *(e + 1) = '\0'; }