mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
Fix error on GCC-6 platform
error: invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ and ‘int’ to binary ‘operator%’
This commit is contained in:
parent
fc4af83fdf
commit
39eebde589
2 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ generate_random_salt(char *salt, int length)
|
|||
}
|
||||
|
||||
for(i = 0; i < length; i++)
|
||||
salt[i] = saltChars[abs(salt[i]) % 64];
|
||||
salt[i] = saltChars[int(abs(salt[i])) % 64];
|
||||
|
||||
close(fd);
|
||||
return (salt);
|
||||
|
|
|
@ -384,7 +384,7 @@ generate_random_salt(char *salt, int length)
|
|||
|
||||
for(i = 0; i < length; i++)
|
||||
{
|
||||
salt[i] = saltChars[abs(buf[i]) % 64];
|
||||
salt[i] = saltChars[int(abs(buf[i])) % 64];
|
||||
}
|
||||
free(buf);
|
||||
return (salt);
|
||||
|
|
Loading…
Reference in a new issue