[Mplayer-cvslog] CVS: main playtreeparser.c,1.15,1.16
Moritz Bunkus CVS
mosu at mplayerhq.hu
Sun Jan 12 12:46:07 CET 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv28484
Modified Files:
playtreeparser.c
Log Message:
bunkus: Another nice off-by-one :)
Index: playtreeparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/playtreeparser.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- playtreeparser.c 11 Jan 2003 21:01:48 -0000 1.15
+++ playtreeparser.c 12 Jan 2003 11:45:49 -0000 1.16
@@ -35,11 +35,13 @@
strstrip(char* str) {
char* i;
+ if (str==NULL)
+ return;
for(i = str ; i[0] != '\0' && strchr(WHITES,i[0]) != NULL; i++)
/* NOTHING */;
if(i[0] != '\0') {
- memmove(str,i,strlen(i));
- for(i = str + strlen(str) ; strchr(WHITES,i[0]) != NULL; i--)
+ memmove(str,i,strlen(i) + 1);
+ for(i = str + strlen(str) - 1 ; strchr(WHITES,i[0]) != NULL; i--)
/* NOTHING */;
i[1] = '\0';
} else
More information about the MPlayer-cvslog
mailing list