[xiph-cvs] cvs commit: vorbis-tools/ogg123 ogg123.c

Stan Seibert volsung at xiph.org
Tue Dec 18 22:24:17 PST 2001



volsung     01/12/18 22:24:17

  Modified:    ogg123   ogg123.c
  Log:
  Re-fixed shuffling bug.

Revision  Changes    Path
1.54      +2 -3      vorbis-tools/ogg123/ogg123.c

Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- ogg123.c	2001/12/19 05:58:45	1.53
+++ ogg123.c	2001/12/19 06:24:16	1.54
@@ -14,7 +14,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ogg123.c,v 1.53 2001/12/19 05:58:45 volsung Exp $
+ last mod: $Id: ogg123.c,v 1.54 2001/12/19 06:24:16 volsung Exp $
 
  ********************************************************************/
 
@@ -315,13 +315,12 @@
     srandom(time(NULL));
     
     for (i = optind; i < argc; i++) {
-      int j = optind + random() % (argc - i);
+      int j = i + random() % (argc - i);
       char *temp = argv[i];
       argv[i] = argv[j];
       argv[j] = temp;
     }
   }
-  
 
   /* Play the files/streams */
 

--- >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