diff options
| author | Florent Monjalet <florent.monjalet@gmail.com> | 2015-11-30 11:13:13 +0100 |
|---|---|---|
| committer | Florent Monjalet <florent.monjalet@gmail.com> | 2016-01-18 14:02:31 +0100 |
| commit | 3c8d4335d26a33d3e14be83ef8b1d7ceed3ad769 (patch) | |
| tree | c3cb4da8c4182600aaa1b7ff6d0114e747f9c2b4 /example/jitter | |
| parent | f21429370a65504745290c39ecb8113163976232 (diff) | |
| download | miasm-3c8d4335d26a33d3e14be83ef8b1d7ceed3ad769.tar.gz miasm-3c8d4335d26a33d3e14be83ef8b1d7ceed3ad769.zip | |
MemStruct: allow Type instance in cast
Diffstat (limited to 'example/jitter')
| -rw-r--r-- | example/jitter/memstruct.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/example/jitter/memstruct.py b/example/jitter/memstruct.py index 5472798d..3b6358cd 100644 --- a/example/jitter/memstruct.py +++ b/example/jitter/memstruct.py @@ -214,10 +214,10 @@ print raw_miams = '\x00'.join('Miams') + '\x00'*3 raw_miams_array = [ord(c) for c in raw_miams] assert list(data.array)[:len(raw_miams_array)] == raw_miams_array -assert data.array.cast(Str("utf16").pinned) == memstr +assert data.array.cast(Str("utf16")) == memstr # Default is "ansi" -assert data.array.cast(Str().pinned) != memstr -assert data.array.cast(Str("utf16").pinned).val == memstr.val +assert data.array.cast(Str()) != memstr +assert data.array.cast(Str("utf16")).val == memstr.val print "See that the original array has been modified:" print repr(data) |