rgb2num(null) crashes with runtime error: bad color. This is incovenient because atom color can be null and even assigning "#ffffff" to it explicitly turns it into null.
Numbered Steps to Reproduce Problem:
1.) Call rgb2num(null)
Code Snippet (if applicable) to Reproduce Problem:
proc/whatever()
world.log << json_encode(rgb2num(null))
Expected Results:
Prints [255, 255, 255]
Actual Results:
runtime error: bad color
Does the problem occur:
Every time? Or how often?every time
In other games?N/A
In other user accounts?N/A
On other computers?N/A
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
rgb2num(color || "#ffffff")