diff --git a/dmsrc/toml.dm b/dmsrc/toml.dm index d30d2bb8..8ef7c277 100644 --- a/dmsrc/toml.dm +++ b/dmsrc/toml.dm @@ -3,6 +3,6 @@ /proc/rustg_read_toml_file(path) var/list/output = rustg_raw_read_toml_file(path) if (output["success"]) - return output["content"] + return json_decode(output["content"]) else CRASH(output["content"]) diff --git a/tests/dm/toml.dme b/tests/dm/toml.dme index a570f4fa..0125be98 100644 --- a/tests/dm/toml.dme +++ b/tests/dm/toml.dme @@ -17,5 +17,5 @@ var/test_json = @{" var/toml_output = rustg_read_toml_file("test.toml") - if (toml_output != test_json) - CRASH("test:\n[test_toml]\n \nexpected:\n[test_json]\n \nrustg:\n[toml_output]") + if (toml_output ~! json_decode(test_json)) + CRASH("test:\n[test_toml]\n \nexpected:\n[test_json]\n \nrustg:\n[json_encode(toml_output)]")