0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02: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:
Jason Volk 2016-08-15 00:22:20 -07:00
parent fc4af83fdf
commit 39eebde589
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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);