Просмотр исходного кода

Fix missing escape characters for the Zerobrane Studio API.

Silverkorn 10 лет назад
Родитель
Сommit
792531552f
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      Source/Urho3D/LuaScript/pkgs/ToZerobraneStudioHook.lua

+ 2 - 1
Source/Urho3D/LuaScript/pkgs/ToZerobraneStudioHook.lua

@@ -107,7 +107,8 @@ function writeFunctionArgs(file, declarations)
       if declaration.def ~= "" then
         param_str = param_str .. " = " .. declaration.def
       end
-      file:write(param_str)
+      local fixedParamStr = param_str:gsub([[(")]], [[\%1]])
+      file:write(fixedParamStr)
     end
     if i ~= count then
       file:write(", ")