script: Fix upper bounds

^ is the XOR operator.
This commit is contained in:
Tobias Brunner 2020-03-04 17:07:32 +01:00
parent e1cc667920
commit 0399314903
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ int main(int argc, char *argv[])
if (argc > 2) if (argc > 2)
{ {
len = atoi(argv[2]); len = atoi(argv[2]);
if (len > (2^30)) if (len > (1 << 30))
{ {
fprintf(stderr, "buffer too large (1 GiB limit)\n"); fprintf(stderr, "buffer too large (1 GiB limit)\n");
return 1; return 1;

View File

@ -56,7 +56,7 @@ int main(int argc, char *argv[])
} }
rounds = atoi(argv[3]); rounds = atoi(argv[3]);
if (rounds < 0 || rounds > (2^26)) if (rounds < 0 || rounds > (1 << 26))
{ /* arbitrary limit to the number of chunk_t/sigs that fit into 1 GiB */ { /* arbitrary limit to the number of chunk_t/sigs that fit into 1 GiB */
usage(); usage();
} }