Skip to content

Commit

Permalink
Debugger: WLA-DX import - Ignore fileId with a mapping of 0 (#26)
Browse files Browse the repository at this point in the history
WLA-DX can generate files with null line mappings. This will happen if your source file does not have any labels directly but does .include other files with labels.
  • Loading branch information
justinvh committed Jul 18, 2023
1 parent bd943c0 commit 0677376
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions UI/Debugger/Integration/WlaDxImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ public void Import(string path, bool showResult)
int fileId = Int32.Parse(m.Groups[field_idx].Value, System.Globalization.NumberStyles.HexNumber);
int lineNumber = Int32.Parse(m.Groups[line_idx].Value, System.Globalization.NumberStyles.HexNumber);

if(fileId == 0) {
// WLA-DX can generate invalid file mappings if a file is optimized away. Ignore these mappings.
errorCount++;
continue;
}

if(lineNumber <= 1) {
//Ignore line number 0 and 1, seems like bad data?
errorCount++;
Expand Down

0 comments on commit 0677376

Please sign in to comment.