Commit 0dcdd962 authored by Stan Seibert's avatar Stan Seibert

Shuffle algorithm more correct now. Fixes Debian bug #114730.

svn path=/trunk/vorbis-tools/; revision=2408
parent de1f0bcf
......@@ -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 @@ int main(int argc, char **argv)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment