From 129ec51861a3d9e1f49b534628b86339ef2eefad Mon Sep 17 00:00:00 2001 From: fecqs <466712071@qq.com> Date: Fri, 26 Jun 2020 21:57:39 +0800 Subject: [PATCH] bugfix (#207) Push should be converted to hexout. unshift --- Conversions/DecimalToHex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Conversions/DecimalToHex.js b/Conversions/DecimalToHex.js index 0fa1b4c12..5b130de9a 100644 --- a/Conversions/DecimalToHex.js +++ b/Conversions/DecimalToHex.js @@ -13,7 +13,7 @@ function intToHex (num) { function decimalToHex (num) { const hexOut = [] while (num > 15) { - hexOut.push(intToHex(num % 16)) + hexOut.unshift(intToHex(num % 16)) num = Math.floor(num / 16) } return intToHex(num) + hexOut.join('')