Fix type mismatch.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@991 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1996-11-16 22:22:32 +00:00
parent 38a4907a92
commit 6ffcd51d18

View File

@@ -2146,12 +2146,13 @@ get_altword (char *s, void *a)
{
OtpAlgorithm *alg = (OtpAlgorithm *)a;
int ret;
char *res = malloc(alg->hashsize);
unsigned char *res = malloc(alg->hashsize);
if (res == NULL)
return -1;
alg->hash (s, strlen(s), res);
ret = res[alg->hashsize - 1] | ((res[alg->hashsize - 2] & 0x03) << 8);
ret = (unsigned)(res[alg->hashsize - 1]) |
((res[alg->hashsize - 2] & 0x03) << 8);
free (res);
return ret;
}