Skip to content

Commit

Permalink
Allow read_memory opcode to work with multiple target variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Nov 24, 2024
1 parent de687b2 commit 8e24cbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cleo_plugins/MemoryOperations/MemoryOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ class MemoryOperations
auto size = OPCODE_READ_PARAM_INT();
auto virtualProtect = OPCODE_READ_PARAM_BOOL();

// validate params
if (size < 0 || size > sizeof(SCRIPT_VAR))
// allowed sizes: 0, 1, 2, 3, 4 and multiplies of 4 until 256
if (size < 0 || size > (64 * 4) || (size > 4 && (size % 4 != 0)))
{
SHOW_ERROR("Invalid '%d' size argument in script %s\nScript suspended.", size, ScriptInfoStr(thread).c_str());
return thread->Suspend();
Expand Down

0 comments on commit 8e24cbe

Please sign in to comment.