diff --git a/Changelog.md b/Changelog.md index 0670e13..d2179ce 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Changelog +[0.3.1] + +- Fixed possible `KeyNotFoundException` in C# code due to invalid + dictionary access when an IC housing has an error + [0.3.0] - Implemented a multi-pass optimizer diff --git a/ModData/About/About.xml b/ModData/About/About.xml index 9b34754..d3a0e4f 100644 --- a/ModData/About/About.xml +++ b/ModData/About/About.xml @@ -2,7 +2,7 @@ Slang JoeDiertay - 0.3.0 + 0.3.1 [h1]Slang: High-Level Programming for Stationeers[/h1] diff --git a/csharp_mod/GlobalCode.cs b/csharp_mod/GlobalCode.cs index bd9c5b2..88286df 100644 --- a/csharp_mod/GlobalCode.cs +++ b/csharp_mod/GlobalCode.cs @@ -56,6 +56,11 @@ public static class GlobalCode return false; } + if (!sourceMaps[reference].ContainsKey(icErrorLine)) + { + return false; + } + var foundRange = sourceMaps[reference][icErrorLine]; if (foundRange is null) diff --git a/csharp_mod/Plugin.cs b/csharp_mod/Plugin.cs index b5f2570..36123c5 100644 --- a/csharp_mod/Plugin.cs +++ b/csharp_mod/Plugin.cs @@ -41,7 +41,7 @@ namespace Slang { public const string PluginGuid = "com.biddydev.slang"; public const string PluginName = "Slang"; - public const string PluginVersion = "0.3.0"; + public const string PluginVersion = "0.3.1"; public static Mod MOD = new Mod(PluginName, PluginVersion); diff --git a/csharp_mod/stationeersSlang.csproj b/csharp_mod/stationeersSlang.csproj index 7be1826..57a61e0 100644 --- a/csharp_mod/stationeersSlang.csproj +++ b/csharp_mod/stationeersSlang.csproj @@ -5,7 +5,7 @@ enable StationeersSlang Slang Compiler Bridge - 0.3.0 + 0.3.1 true latest diff --git a/rust_compiler/Cargo.toml b/rust_compiler/Cargo.toml index 047478e..5b2305a 100644 --- a/rust_compiler/Cargo.toml +++ b/rust_compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slang" -version = "0.3.0" +version = "0.3.1" edition = "2021" [workspace]