Skip to content

Commit fb0cdb8

Browse files
author
Ibrahim Jarif
authored
Cast idx to uint32 to fix compilation on i386 (#1118)
`env GOOS=linux GOARCH=386` go build no longer complains about integer overflow. See #953 (comment)
1 parent 5f94f68 commit fb0cdb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

table/table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func (t *Table) block(idx int) (*block, error) {
432432

433433
func (t *Table) blockCacheKey(idx int) uint64 {
434434
y.AssertTrue(t.ID() < math.MaxUint32)
435-
y.AssertTrue(idx < math.MaxUint32)
435+
y.AssertTrue(uint32(idx) < math.MaxUint32)
436436
return (t.ID() << 32) | uint64(idx)
437437
}
438438

0 commit comments

Comments
 (0)