diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-16 01:24:46 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-16 01:24:46 +0100 |
commit | 76f2278916ff8baec5f023e72237baca7e81f762 (patch) | |
tree | a03eef02a85a1f0cbb20876ff6f9f618a50325f6 | |
parent | update todo: host endian to network endian, and network endian to host endian, conversion functions for 64-bits. (diff) | |
download | slibc-76f2278916ff8baec5f023e72237baca7e81f762.tar.gz slibc-76f2278916ff8baec5f023e72237baca7e81f762.tar.bz2 slibc-76f2278916ff8baec5f023e72237baca7e81f762.tar.xz |
fix issue #5 on github
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
-rw-r--r-- | src/string/strfry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strfry.c b/src/string/strfry.c index ac8ef13..bced7ce 100644 --- a/src/string/strfry.c +++ b/src/string/strfry.c @@ -43,7 +43,7 @@ char* strfry(char* anagram) for (i = strlen(anagram); --i;) { r = rand(); - j = (size_t)((double)r / (RAND_MAX + 1) * (double)i); + j = (size_t)((double)r / ((double)RAND_MAX + 1) * (double)i); t = anagram[i], anagram[i] = anagram[j], anagram[j] = t; } return anagram; |