From 2045ea770c6b9a8356c8bd41792269c55d4a5a98 Mon Sep 17 00:00:00 2001 From: Erki Date: Tue, 24 Sep 2019 00:26:38 +0300 Subject: [PATCH] DMM Reader now crashes upon invalid type. (#7038) --- code/modules/maps/reader.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/maps/reader.dm b/code/modules/maps/reader.dm index 77baf237fdd..d7d995f344c 100644 --- a/code/modules/maps/reader.dm +++ b/code/modules/maps/reader.dm @@ -230,10 +230,13 @@ var/global/dmm_suite/preloader/_preloader = new var/full_def = trim_text(copytext(model, old_position, dpos)) //full definition, e.g : /obj/foo/bar{variables=derp} var/variables_start = findtext(full_def, "{") - var/atom_def = text2path(trim_text(copytext(full_def, 1, variables_start))) //path definition, e.g /obj/foo/bar + + var/path_str = trim_text(copytext(full_def, 1, variables_start)) + var/atom_def = text2path(path_str) //path definition, e.g /obj/foo/bar old_position = dpos + 1 if(!atom_def) // Skip the item if the path does not exist. Fix your crap, mappers! + crash_with("Invalid type in map. [path_str]") continue members += atom_def