diff --git a/VirtualMachine/EVIL.Ceres/EVIL.Ceres.csproj b/VirtualMachine/EVIL.Ceres/EVIL.Ceres.csproj index 27e378c..f133711 100644 --- a/VirtualMachine/EVIL.Ceres/EVIL.Ceres.csproj +++ b/VirtualMachine/EVIL.Ceres/EVIL.Ceres.csproj @@ -8,7 +8,7 @@ true true - 7.7.0 + 7.8.0 false diff --git a/VirtualMachine/EVIL.Ceres/ExecutionEngine/ExecutionUnit.cs b/VirtualMachine/EVIL.Ceres/ExecutionEngine/ExecutionUnit.cs index 9a033cf..27a3fcc 100644 --- a/VirtualMachine/EVIL.Ceres/ExecutionEngine/ExecutionUnit.cs +++ b/VirtualMachine/EVIL.Ceres/ExecutionEngine/ExecutionUnit.cs @@ -1304,6 +1304,18 @@ public void Step() a = PopValue(); // Key c = PopValue(); // Table + if (c.Type == DynamicValueType.String && a.Type == DynamicValueType.String) + { + c = _global.Index("str"); + + if (c.Type != DynamicValueType.Table) + { + throw new UnsupportedDynamicValueOperationException( + "Attempt to index a string value using a string, but no `str' support table found." + ); + } + } + if (c.Type == DynamicValueType.Table) { if (!c.Table!.Contains(a))