From 71f48c822011ef315705bb338994581e072ad7e7 Mon Sep 17 00:00:00 2001 From: Mark Koennecke Date: Wed, 23 Apr 2014 14:15:46 +0200 Subject: [PATCH] Added an assertion which will trigger when number size wrong --- astriumnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/astriumnet.c b/astriumnet.c index 24de472..47ecc41 100644 --- a/astriumnet.c +++ b/astriumnet.c @@ -25,6 +25,7 @@ #include #include + extern char *trim(char *); typedef struct { @@ -141,6 +142,8 @@ static long long calculateToken(char *password, long long hash) long long tmp; int i; + assert(sizeof(hash) == 8); + tmp = hash ^ 0x80AA80AA; for(i = 0; i < strlen(password); i++){ tmp += password[i] * (long long)pow(2,i);