Mercurial > mplayer.hg
comparison subreader.c @ 3924:9f18722fafe9
tail_space infinite loop fix by jeon_goon@lycos.co.kr
author | arpi |
---|---|
date | Tue, 01 Jan 2002 01:11:31 +0000 |
parents | 8baf42fa69b9 |
children | 654419a9a228 |
comparison
equal
deleted
inserted
replaced
3923:3fd9b781a9d2 | 3924:9f18722fafe9 |
---|---|
44 } | 44 } |
45 | 45 |
46 /* Remove leading and trailing space */ | 46 /* Remove leading and trailing space */ |
47 static void trail_space(char *s) { | 47 static void trail_space(char *s) { |
48 int i = 0; | 48 int i = 0; |
49 while (isspace(*s)) ++i; | 49 while (isspace(s[i])) ++i; |
50 if (i) strcpy(s, s + i); | 50 if (i) strcpy(s, s + i); |
51 i = strlen(s) - 1; | 51 i = strlen(s) - 1; |
52 while (i > 0 && isspace(s[i])) s[i--] = '\0'; | 52 while (i > 0 && isspace(s[i])) s[i--] = '\0'; |
53 } | 53 } |
54 | 54 |