Skip to content

Commit

Permalink
Merge pull request cheat-engine#124 from mgrinzPlayer/stringToMD5Stri…
Browse files Browse the repository at this point in the history
…ng-now-support-strings-with-0

stringToMD5String now supports strings with \0
  • Loading branch information
cheat-engine authored Nov 20, 2016
2 parents 712848c + df7af75 commit 422a8e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Cheat Engine/LuaHandler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5923,12 +5923,13 @@ function getApplication(L:PLua_State): integer; cdecl;
end;

function lua_stringToMD5String(L:PLua_State): integer; cdecl;
var s: string;
var msg: pchar;
size: integer;
begin
if lua_gettop(L)=1 then
begin
s:=Lua_ToString(L,1);
lua_pushstring(L, MD5Print(MD5String(s)));
msg:=lua_tolstring(L, 1, @size);
lua_pushstring(L, MD5Print(MD5Buffer(msg^,size)));
result:=1;
end
else
Expand Down

0 comments on commit 422a8e8

Please sign in to comment.