From 2f603b69c34be40251cf457a724ba732a38176bc Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 10 May 2023 10:05:00 -0700 Subject: [PATCH] Fix format overwrite test A SOS binary had situation were an instruction was being reformatted as inline data by an extension script. The code that was supposed to detect and prevent this had a bug that caused it to only look at the first byte. The resulting confusion caused the program to crash. (issue #150) --- SourceGen/CodeAnalysis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceGen/CodeAnalysis.cs b/SourceGen/CodeAnalysis.cs index 3990d5e..bf0a7da 100644 --- a/SourceGen/CodeAnalysis.cs +++ b/SourceGen/CodeAnalysis.cs @@ -1171,7 +1171,7 @@ namespace SourceGen { " (" + mAnalyzerTags[i] + ")"); return false; } - if (mAnattribs[offset].IsInstruction) { + if (mAnattribs[i].IsInstruction) { LogW(offset, "SIDF rej: not for use with instructions"); return false; }