Prototype: Fix shitty string serialisation, Lua offers %q fmt
This commit is contained in:
parent
159c336d5a
commit
c5deb5c458
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user