Fixes num2hex

This commit is contained in:
GinjaNinja32
2015-07-07 18:02:59 +01:00
parent 8305dd65a3
commit 27911bb7ad
+2 -2
View File
@@ -49,7 +49,7 @@
var/n = 1
// Figure out power. (power of 2)
while (n < num)
while (n <= num)
power += 4
n *= 16
@@ -60,7 +60,7 @@
power -= 4
// Append zeroes to make sure that hex is atleast digits long.
var/left = length(hex) - digits
var/left = digits - length(hex)
while (left-- > 0)
hex = text("0[]", hex)