diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2020-09-10 00:26:58 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2020-09-10 00:26:58 +0200 |
| commit | c3ae4f295fd69aad149e495eaf975f47417dac65 (patch) | |
| tree | f9eea8cadab8325507361cfafd36ec4a6a484d0f /DTUtility.c | |
| parent | ee77ad7e1eab90fb40c8ef355e24e3ce6ef79d9d (diff) | |
| download | System.c4g-c3ae4f295fd69aad149e495eaf975f47417dac65.tar.gz System.c4g-c3ae4f295fd69aad149e495eaf975f47417dac65.zip | |
#strict 3 fixes
Diffstat (limited to 'DTUtility.c')
| -rw-r--r-- | DTUtility.c | 5 |
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));
}
|
