Skip to content

Commit

Permalink
fix bug with memset
Browse files Browse the repository at this point in the history
  • Loading branch information
gynt committed Jul 13, 2024
1 parent 7d5b2d2 commit 4ac87ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions MemoryFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,11 @@ int luaMemSet(lua_State* L) {
return luaL_error(L, "argument 1 must be a valid address");
}

DWORD val = lua_tointeger(L, 2);
if (val == 0) {
if (lua_type(L, 2) != LUA_TNUMBER) {
return luaL_error(L, "argument 2 must be a valid integer");
}
DWORD val = lua_tointeger(L, 2);


int size = lua_tointeger(L, 3);
if (size == 0) {
Expand Down
2 changes: 1 addition & 1 deletion RuntimePatchingSystem.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>RPS</id>
<version>1.5.0</version>
<version>1.5.1</version>
<title>Runtime Patching System</title>
<authors>gynt</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down

0 comments on commit 4ac87ec

Please sign in to comment.