Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
Fix modified project when loading a project with packer
Browse files Browse the repository at this point in the history
  • Loading branch information
yck1509 committed Oct 9, 2015
1 parent 469682c commit 40cbc88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Confuser.Protections/Compress/Compressor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void OnWriterEvent(ModuleWriterBase writer, ModuleWriterEvent evt) {
ctx.KeyToken = sigToken;
MutationHelper.InjectKey(writer.Module.EntryPoint, 2, (int)sigToken);
}
else if (evt == ModuleWriterEvent.MDBeginAddResources) {
else if (evt == ModuleWriterEvent.MDBeginAddResources && !ctx.CompatMode) {
// Compute hash
byte[] hash = SHA1.Create().ComputeHash(ctx.OriginModule);
uint hashBlob = writer.MetaData.BlobHeap.Add(hash);
Expand Down
4 changes: 2 additions & 2 deletions ConfuserEx/ViewModel/UI/SettingsTabVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void InitProject() {

protected override void OnPropertyChanged(string property) {
if (property == "HasPacker") {
if (hasPacker)
if (hasPacker && App.Project.Packer == null)
App.Project.Packer = new ProjectSettingVM<Packer>(App.Project, new SettingItem<Packer> { Id = App.Project.Packers[0].Id });
else
else if (!hasPacker)
App.Project.Packer = null;
}
base.OnPropertyChanged(property);
Expand Down

0 comments on commit 40cbc88

Please sign in to comment.