From 1d648a23a6edc61745446f35dec0fc0290dbe434 Mon Sep 17 00:00:00 2001 From: Pagran <67878280+pagran@users.noreply.github.com> Date: Tue, 28 Jul 2020 21:35:27 +0300 Subject: [PATCH] Fix getIndexType --- internal/literals/swap.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/literals/swap.go b/internal/literals/swap.go index 2d912c9..40355f0 100644 --- a/internal/literals/swap.go +++ b/internal/literals/swap.go @@ -18,8 +18,10 @@ func getIndexType(dataLen int) string { return "byte" case dataLen <= math.MaxUint16: return "uint16" - default: + case dataLen <= math.MaxUint32: return "uint32" + default: + return "uint64" } }