Skip to content

Commit

Permalink
Fixed small bug with relocation table.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkinsella committed Jun 19, 2016
1 parent 0357b8a commit fb1c6d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Workshell.PE/Content/Relocation/RelocationTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static RelocationTable Get(ExecutableImage image)
if (!image.NTHeaders.DataDirectories.Exists(DataDirectoryType.Debug))
return null;

DataDirectory directory = image.NTHeaders.DataDirectories[DataDirectoryType.Debug];
DataDirectory directory = image.NTHeaders.DataDirectories[DataDirectoryType.BaseRelocationTable];

if (DataDirectory.IsNullOrEmpty(directory))
return null;
Expand Down
8 changes: 8 additions & 0 deletions Src/Workshell.PE/DataDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ public uint Size
}
}

public bool IsEmpty
{
get
{
return (data_dir.Size == 0);
}
}

#endregion

}
Expand Down

0 comments on commit fb1c6d0

Please sign in to comment.