diff --git a/dlls/fakemeta/forward.cpp b/dlls/fakemeta/forward.cpp index 28fb952f..12910214 100755 --- a/dlls/fakemeta/forward.cpp +++ b/dlls/fakemeta/forward.cpp @@ -503,14 +503,20 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params) return 0; } - CVector::iterator begin, end=Engine[func].end(); + CVector *peng = NULL; + if (post) + peng = &(Engine[func]); + else + peng = &(EnginePost[func]); - for (begin=Engine[func].begin(); begin!=end; begin++) + CVector::iterator begin, end=peng->end(); + + for (begin=peng->begin(); begin!=end; begin++) { if ((*begin) == func_id) { - Engine[func].erase(begin); - if (!Engine[func].size()) + peng->erase(begin); + if (!peng->size()) { //:TODO: we should probably clear this here! //but, we have no reverse lookup possible. @@ -522,7 +528,6 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params) return 0; } - static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params) { int func = params[1];