From e210d3c785fe41417e55803085ab672d6d3cf466 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 16 Aug 2019 02:24:14 +0200 Subject: [PATCH] Fixed a small edge case when renaming "vector" fields --- src/ComputeSharp.Shaders/Translation/ShaderLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs b/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs index 507a8742..feeba23f 100644 --- a/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs +++ b/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs @@ -201,7 +201,7 @@ namespace ComputeSharp.Shaders.Translation // Additional preprocessing MethodBody = Regex.Replace(MethodBody, @"\d+[fFdD]", m => m.Value.Replace("f", "")); MethodBody = MethodBody.TrimEnd('\n', '\r', ' '); - MethodBody = MethodBody.Replace("vector", "_vector"); // The decompiler can name a local Vector[2,3,4] variable as "vector" + MethodBody = Regex.Replace(MethodBody, @"(?