num2hex() server freeze fix (#16541)

This commit is contained in:
SabreML
2021-08-14 08:41:01 +01:00
committed by GitHub
parent aa820ab123
commit f190df3d3c
+3 -3
View File
@@ -43,9 +43,9 @@
return num
//Returns the hex value of a number given a value assumed to be a base-ten value
/proc/num2hex(num, placeholder)
if(!isnum(num)) return
if(placeholder == null) placeholder = 2
/proc/num2hex(num, placeholder = 2)
if(!isnum(num) || num < 0)
return
var/hex = ""
while(num)