From 44da4f66c1385aeb9eaa24591a95ed7d3a90b146 Mon Sep 17 00:00:00 2001
From: Wei-Ning Huang <w@dexon.org>
Date: Mon, 26 Nov 2018 16:59:08 +0800
Subject: core: vm: fix power2 table calculation (#50)

---
 core/vm/instructions.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'core/vm')

diff --git a/core/vm/instructions.go b/core/vm/instructions.go
index 499e066f7..3a82190da 100644
--- a/core/vm/instructions.go
+++ b/core/vm/instructions.go
@@ -43,10 +43,10 @@ var (
 )
 
 func init() {
-	cur := int64(1)
+	cur := big.NewInt(1)
 	for i := 0; i < 256; i++ {
-		power2[i] = big.NewInt(cur)
-		cur <<= 1
+		power2[i] = new(big.Int).Set(cur)
+		cur = new(big.Int).Mul(cur, big2)
 	}
 }
 
-- 
cgit v1.2.3