mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 12:11:45 +00:00
Fixes a runtime in "reference decoder" circuit (#35754)
* Adds "safe" option to hextostr and hex2num * Fixes a runtime in ICs
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
pull_data()
|
||||
var/atom/A = get_pin_data(IC_INPUT, 1)
|
||||
if(A && istype(A))
|
||||
result = strtohex(XorEncrypt(REF(A),SScircuit.cipherkey))
|
||||
result = strtohex(XorEncrypt(REF(A), SScircuit.cipherkey))
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
@@ -97,8 +97,8 @@
|
||||
|
||||
/obj/item/integrated_circuit/converter/refdecode/do_work()
|
||||
pull_data()
|
||||
dec=XorEncrypt(hextostr(get_pin_data(IC_INPUT, 1)),SScircuit.cipherkey)
|
||||
set_pin_data(IC_OUTPUT, 1, WEAKREF(locate( dec )))
|
||||
dec = XorEncrypt(hextostr(get_pin_data(IC_INPUT, 1), TRUE), SScircuit.cipherkey)
|
||||
set_pin_data(IC_OUTPUT, 1, WEAKREF(locate(dec)))
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user