summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DTUtility.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/DTUtility.c b/DTUtility.c
index 5d09614..752000b 100644
--- a/DTUtility.c
+++ b/DTUtility.c
@@ -1,4 +1,4 @@
-#strict 2
+#strict 3
global func Isolate(object obj) // Puts the object in its own layer to prevent interaction
{
@@ -19,6 +19,7 @@ global func GetIndexOf2(val, array arr) // Because GetIndexOf doesn't find Forma
global func Serialize(value)
{
+ if(value == nil) return "nil";
if(GetType(value) == C4V_Map)
{
var nonIdentifierKeyInits = [];
@@ -79,7 +80,7 @@ global func Serialize(value)
else if(GetType(value) == C4V_Bool) if(value) return "true"; else return "false";
else if(GetType(value) == C4V_C4ID) return Format("%i", value);
else if(GetType(value) == C4V_C4Object) return Format("Object(%d)", ObjectNumber(value));
- else if(GetType(value) == C4V_Int || GetType(value) == C4V_Any) return Format("%d", value);
+ else if(GetType(value) == C4V_Int) return Format("%d", value);
else if(GetType(value) == C4V_String) return Format("\"%s\"", EscapeString(value));
}