[xiph-cvs] cvs commit: ices/src playlist_basic.c

Michael Smith msmith at xiph.org
Wed Nov 7 05:52:53 PST 2001



msmith      01/11/07 05:52:52

  Modified:    src      playlist_basic.c
  Log:
  Fix for bug #75. Which wasn't really a bug, but people didn't like that
  design aspect.

Revision  Changes    Path
1.4       +7 -3      ices/src/playlist_basic.c

Index: playlist_basic.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/playlist_basic.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- playlist_basic.c	2001/09/28 10:16:54	1.3
+++ playlist_basic.c	2001/11/07 13:52:52	1.4
@@ -1,7 +1,7 @@
 /* playlist_basic.c
  * - Simple built-in unscripted playlist
  *
- * $Id: playlist_basic.c,v 1.3 2001/09/28 10:16:54 msmith Exp $
+ * $Id: playlist_basic.c,v 1.4 2001/11/07 13:52:52 msmith Exp $
  *
  * Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
  *
@@ -79,11 +79,15 @@
         while (1) 
         {
                 if(fgets(buf,1024, file) == NULL) break;
-		if(buf[0]==0 || buf[0]=='\n') break;
+		if(buf[0]==0) break;
+
+        if(buf[0]=='\n' || (buf[0]=='\r' && buf[1]=='\n'))
+            continue;
+
                 buf[strlen(buf)-1] = 0;
 
                 /* De-fuck windows files. */
-		if(buf[strlen(buf)-1] == '\r')
+		if(strlen(buf) > 0 && buf[strlen(buf)-1] == '\r')
                         buf[strlen(buf)-1] = 0;
 
                 if(buflen < data->len+1)

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list