From b90a9016847ef4171d8685be7f5bd1d502a20dc5 Mon Sep 17 00:00:00 2001 From: ciccio87 Date: Sat, 17 Aug 2013 08:04:19 +0200 Subject: [PATCH] OK, now the 32bit fix should be working, keeping numbers right (maybe issues could still exists in summary print) --- src/zmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zmap.c b/src/zmap.c index 33c4a7b..ca3d495 100644 --- a/src/zmap.c +++ b/src/zmap.c @@ -458,7 +458,7 @@ int main(int argc, char *argv[]) } if (end[0] == '%' && end[1] == '\0') { // treat as percentage - v = v * (1L << (int)sizeof(long)*4) / 100.; + v = v * ((unsigned long long int)1 << 32) / 100.; } else if (end[0] != '\0') { fprintf(stderr, "%s: extra characters after max-targets\n", CMDLINE_PARSER_PACKAGE); @@ -467,7 +467,7 @@ int main(int argc, char *argv[]) if (v <= 0) { zconf.max_targets = 0; } - else if (v >= (1L << (int)sizeof(long)*4)) { + else if (v >= ((unsigned long long int)1 << 32)) { zconf.max_targets = 0xFFFFFFFF; } else { zconf.max_targets = v;