aboutsummaryrefslogtreecommitdiffstats
path: root/src/string
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/string/strfry.c2
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;