Skip to content

Commit 4a69ad2

Browse files
committedJan 31, 2024
8324184: Windows VS2010 build failed with "error C2275: 'int64_t'"
Reviewed-by: sgehwolf Backport-of: 4f80edfae10e83f2709f297a553d2128712e4b51
1 parent 552c686 commit 4a69ad2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎jdk/src/share/native/common/check_code.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1683,12 +1683,13 @@ static int instruction_length(unsigned char *iptr, unsigned char *end)
16831683
switch (instruction) {
16841684
case JVM_OPC_tableswitch: {
16851685
int *lpc = (int *)UCALIGN(iptr + 1);
1686+
int64_t low, high, index;
16861687
if (lpc + 2 >= (int *)end) {
16871688
return -1; /* do not read pass the end */
16881689
}
1689-
int64_t low = _ck_ntohl(lpc[1]);
1690-
int64_t high = _ck_ntohl(lpc[2]);
1691-
int64_t index = high - low;
1690+
low = _ck_ntohl(lpc[1]);
1691+
high = _ck_ntohl(lpc[2]);
1692+
index = high - low;
16921693
// The value of low must be less than or equal to high - i.e. index >= 0
16931694
if ((index < 0) || (index > 65535)) {
16941695
return -1; /* illegal */

0 commit comments

Comments
 (0)
Please sign in to comment.