From 065066acc4da7ca36d91787bb8b1abf9ed5393d4 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 3 Apr 2016 19:29:28 +0200 Subject: [PATCH] Fix opening the scriptwrapper.lua file as read-write --- OpenRA.Game/Scripting/ScriptContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Scripting/ScriptContext.cs b/OpenRA.Game/Scripting/ScriptContext.cs index 9757c1bee5..fbbd30a86a 100644 --- a/OpenRA.Game/Scripting/ScriptContext.cs +++ b/OpenRA.Game/Scripting/ScriptContext.cs @@ -160,7 +160,7 @@ namespace OpenRA.Scripting .ToArray(); runtime.Globals["GameDir"] = Platform.GameDir; - runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open).ReadAllText(), "scriptwrapper.lua").Dispose(); + runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open, FileAccess.Read).ReadAllText(), "scriptwrapper.lua").Dispose(); tick = (LuaFunction)runtime.Globals["Tick"]; // Register globals