From 4366afeceeb917e7bea7e4142eb4380417856111 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 4 Sep 2016 21:57:00 +0200 Subject: [PATCH] Initializing u64 value with something 'u' seem to limit it's maximum value to 0xffffffff and then stop. So this broke restore support, as you can see when the restore pointer went > 0xffffffff, also in status view. cc @neheb --- src/hashcat.c | 2 +- src/shared.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hashcat.c b/src/hashcat.c index f60fa32fc..85260054b 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -5537,7 +5537,7 @@ static void *thread_calc (void *p) u64 words_off = 0; u64 words_fin = 0; - u64 max = -1u; + u64 max = -1llu; while (max) { diff --git a/src/shared.c b/src/shared.c index 9fd8d70b6..90eaf4a83 100644 --- a/src/shared.c +++ b/src/shared.c @@ -9578,7 +9578,7 @@ void read_restore (const char *eff_restore_file, restore_data_t *rd) u64 get_lowest_words_done () { - u64 words_cur = -1u; + u64 words_cur = -1llu; for (uint device_id = 0; device_id < data.devices_cnt; device_id++) {