Skip to content

Commit

Permalink
Report two to the power overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ckirsch committed Jul 2, 2024
1 parent 6854175 commit 6af1b7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions selfie.c
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,8 @@ uint64_t two_to_the_power_of(uint64_t p) {
if (p < SIZEOFUINT64INBITS)
return *(power_of_two_table + p);

printf("%s: 2^%lu overflow\n", selfie_name, p);

exit(EXITCODE_SYSTEMERROR);
}

Expand Down

0 comments on commit 6af1b7f

Please sign in to comment.