mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix for #38
This commit is contained in:
@@ -132,6 +132,7 @@ namespace hook
|
||||
NESTING_LIMIT = 84, // the hook nested blocks/loops/ifs beyond 16 levels
|
||||
SECTIONS_OUT_OF_SEQUENCE = 85, // the wasm contained sections out of sequence
|
||||
CUSTOM_SECTION_DISALLOWED = 86, // the wasm contained a custom section (id=0)
|
||||
INTERNAL_ERROR = 87, // an internal error described by the log text
|
||||
// RH NOTE: only HookSet msgs got log codes, possibly all Hook log lines should get a code?
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1260,7 +1260,13 @@ SetHook::setHook()
|
||||
|
||||
// if there is only an existing hook, without a HookSetObj then it is
|
||||
// logically impossible for the operation to not be NOOP
|
||||
assert(hookSetObj || op == hsoNOOP);
|
||||
if(!hookSetObj && op != hsoNOOP)
|
||||
{
|
||||
JLOG(ctx.j.warn())
|
||||
<< "HookSet(" << hook::log::INTERNAL_ERROR << ")[" << HS_ACC()
|
||||
<< "]: Logic error. !hookSetObj && op != hsoNOOP";
|
||||
return tecINTERNAL;
|
||||
}
|
||||
|
||||
switch (op)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user