From 75133d1bc751c935fdb42af85e3bc87145ddab1f Mon Sep 17 00:00:00 2001 From: MrPerson Date: Fri, 14 Feb 2020 11:38:08 -0600 Subject: [PATCH] Fixes an SQDL2 runtime error (#49327) If you tried to call SQDL with " at the end, it would throw eg WHERE var="something" --- code/modules/admin/verbs/SDQL2/SDQL_2.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 7f73f384a6b..bb3c9df152d 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -1176,7 +1176,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null char = query_text[i] if(char == "\"") - if(query_text[i + length(char)] == "'") + if((i + length(char) <= len) && query_text[i + length(char)] == "'") word += "\"" i += length(query_text[i + length(char)])