diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-06-03 17:34:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-03 17:34:38 +0200 |
| commit | fd82220c5ad3512f00371a8828f63116185a77c3 (patch) | |
| tree | 0c1542485e0db4ec24815662ec748cce13d463da | |
| parent | a5f4ba4774838c48b27ee863e756a84e913d2917 (diff) | |
| parent | 4f0a824b36ef56a3844c486a877732a96017de12 (diff) | |
| download | miasm-fd82220c5ad3512f00371a8828f63116185a77c3.tar.gz miasm-fd82220c5ad3512f00371a8828f63116185a77c3.zip | |
Merge pull request #1247 from icecr4ck/fix_msvcrt_wcsrchr
Fix type error in msvcrt_wcsrchr and msvcrt_strrchr for Python 3
Diffstat (limited to '')
| -rw-r--r-- | miasm/os_dep/win_api_x86_32.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm/os_dep/win_api_x86_32.py b/miasm/os_dep/win_api_x86_32.py index e83a3993..a35da991 100644 --- a/miasm/os_dep/win_api_x86_32.py +++ b/miasm/os_dep/win_api_x86_32.py @@ -2008,7 +2008,7 @@ def msvcrt_memset(jitter): def msvcrt_strrchr(jitter): ret_ad, args = jitter.func_args_cdecl(['pstr','c']) s = get_win_str_a(jitter, args.pstr) - c = int_to_byte(args.c) + c = int_to_byte(args.c).decode() ret = args.pstr + s.rfind(c) log.info("strrchr(%x '%s','%s') = %x" % (args.pstr,s,c,ret)) jitter.func_ret_cdecl(ret_ad, ret) @@ -2016,7 +2016,7 @@ def msvcrt_strrchr(jitter): def msvcrt_wcsrchr(jitter): ret_ad, args = jitter.func_args_cdecl(['pstr','c']) s = get_win_str_w(jitter, args.pstr) - c = int_to_byte(args.c) + c = int_to_byte(args.c).decode() ret = args.pstr + (s.rfind(c)*2) log.info("wcsrchr(%x '%s',%s) = %x" % (args.pstr,s,c,ret)) jitter.func_ret_cdecl(ret_ad, ret) |