Skip to content

Commit

Permalink
LauncherStore vtable: fix missing destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMrARM committed Nov 21, 2018
1 parent bd70ff2 commit c2a58e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ void LauncherStore::initVtable(void *lib) {

myVtable = (void**) ::operator new((myVtableSize + 1) * sizeof(void*));
myVtable[myVtableSize] = nullptr;
myVtable[0] = (void*) (void (*) (LauncherStore* p)) [](LauncherStore* p) { p->~LauncherStore(); };
myVtable[1] = (void*) (void (*) (LauncherStore* p)) [](LauncherStore* p) { delete p; };

PatchUtils::VtableReplaceHelper vtr (lib, myVtable, vta);
vtr.replace("_ZNK5Store22isReadyToMakePurchasesEv", &LauncherStore::isReadyToMakePurchases);
Expand Down

0 comments on commit c2a58e6

Please sign in to comment.