Explicitly cast result of Math.pow to int in BinaryToHexadecimal (#4970)

This commit is contained in:
Piotr Idzik 2023-11-29 22:30:59 +01:00 committed by GitHub
parent 361b4108ee
commit f8de290188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ public class BinaryToHexadecimal {
for (i = 0; i < 4; i++) {
currbit = binary % 10;
binary = binary / 10;
code4 += currbit * Math.pow(2, i);
code4 += currbit * (int) Math.pow(2, i);
}
hex = hm.get(code4) + hex;
}