diff options
| author | Alexander Gavrilov | 2012-09-01 11:25:24 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-01 11:25:24 +0400 |
| commit | e0097d8d43013d72d729e2ae71cdd6a73a110d8d (patch) | |
| tree | a03b0e71f2d9712d14193f26a0acd2bc3bc4470e /library/VTableInterpose.cpp | |
| parent | c68afdaad23ccb9e1c33ec118514c78e5376a72e (diff) | |
| download | dfhack-e0097d8d43013d72d729e2ae71cdd6a73a110d8d.tar.gz dfhack-e0097d8d43013d72d729e2ae71cdd6a73a110d8d.tar.bz2 dfhack-e0097d8d43013d72d729e2ae71cdd6a73a110d8d.tar.xz | |
Fix access to unnamed bits in bitfields, and allow hook.apply(false)
Diffstat (limited to 'library/VTableInterpose.cpp')
| -rw-r--r-- | library/VTableInterpose.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/VTableInterpose.cpp b/library/VTableInterpose.cpp index 079890fe..583ef518 100644 --- a/library/VTableInterpose.cpp +++ b/library/VTableInterpose.cpp @@ -335,8 +335,14 @@ void VMethodInterposeLinkBase::on_host_delete(virtual_identity *from) } } -bool VMethodInterposeLinkBase::apply() +bool VMethodInterposeLinkBase::apply(bool enable) { + if (!enable) + { + remove(); + return true; + } + if (is_applied()) return true; if (!host->vtable_ptr) |
