diff options
Diffstat (limited to 'python/databuffer.py')
| -rw-r--r-- | python/databuffer.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/databuffer.py b/python/databuffer.py index 8644a75e..3d754090 100644 --- a/python/databuffer.py +++ b/python/databuffer.py @@ -34,6 +34,8 @@ class DataBuffer(object): self.handle = core.handle_of_type(handle, core.BNDataBuffer) elif isinstance(contents, int) or isinstance(contents, long): self.handle = core.BNCreateDataBuffer(None, contents) + elif isinstance(contents, str): + self.handle = core.BNCreateDataBuffer(contents.encode(), len(contents.encode())) elif isinstance(contents, DataBuffer): self.handle = core.BNDuplicateDataBuffer(contents.handle) else: |
