From c5deb5c4587e35ff769d579e1d9c0e942bda80e0 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Sun, 19 Jun 2022 16:20:59 +0000 Subject: [PATCH] Prototype: Fix shitty string serialisation, Lua offers %q fmt --- Install_00/Prototype.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Install_00/Prototype.lua b/Install_00/Prototype.lua index 2b3ca73..46cbf2d 100644 --- a/Install_00/Prototype.lua +++ b/Install_00/Prototype.lua @@ -45,7 +45,7 @@ function Prototype:__tostring() elseif t=="number" or t=="boolean" then return tostring(self) elseif t=="string" then - return "\""..self:gsub("\\","\\\\"):gsub("\"","\\\"").."\"" + return ("%q"):format(self) else return "nil" end