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

Stan Seibert volsung at xiph.org
Tue Nov 27 21:47:17 PST 2001



volsung     01/11/27 21:47:17

  Modified:    ogg123   ogg123.c
  Log:
  Shuffle algorithm more correct now.  Fixes Debian bug #114730.

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

Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- ogg123.c	2001/10/02 03:10:42	1.48
+++ ogg123.c	2001/11/28 05:47:16	1.49
@@ -14,7 +14,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ogg123.c,v 1.48 2001/10/02 03:10:42 msmith Exp $
+ last mod: $Id: ogg123.c,v 1.49 2001/11/28 05:47:16 volsung Exp $
 
  ********************************************************************/
 
@@ -239,7 +239,7 @@
         srand(time(NULL));
 
         for (i = optind; i < argc; i++) {
-		int j = optind + rand() % (argc - i);
+		int j = i + rand() % (argc - i);
                 char *temp = argv[i];
                 argv[i] = argv[j];
                 argv[j] = temp;

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