diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-09-02 19:45:09 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-09-02 19:45:09 +0200 |
commit | f252c29710f71e7c260d9e866c8d4eef885705c3 (patch) | |
tree | 22614e2bfc48b2901055484eed2f049d9ec4104e /src/string | |
parent | m (diff) | |
download | slibc-f252c29710f71e7c260d9e866c8d4eef885705c3.tar.gz slibc-f252c29710f71e7c260d9e866c8d4eef885705c3.tar.bz2 slibc-f252c29710f71e7c260d9e866c8d4eef885705c3.tar.xz |
fix some warnings and errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-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 cf8d643..da6d0ac 100644 --- a/src/string/strfry.c +++ b/src/string/strfry.c @@ -41,7 +41,7 @@ char* strfry(char* anagram) for (i = strlen(anagram); --i;) { r = rand(); - j = (int)((double)r / (RAND_MAX + 1)); + j = (size_t)((double)r / (RAND_MAX + 1) * (double)i); t = anagram[i], anagram[i] = anagram[j], anagram[j] = t; } return anagram; |