diff options
Diffstat (limited to 'source3/utils/regedit_hexedit.c')
-rw-r--r-- | source3/utils/regedit_hexedit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/regedit_hexedit.c b/source3/utils/regedit_hexedit.c index c86feaddb0..42eee8f78a 100644 --- a/source3/utils/regedit_hexedit.c +++ b/source3/utils/regedit_hexedit.c @@ -23,7 +23,7 @@ static int hexedit_free(struct hexedit *buf) } struct hexedit *hexedit_new(TALLOC_CTX *ctx, WINDOW *parent, int nlines, - int y, int x, size_t sz) + int y, int x, const void *data, size_t sz) { struct hexedit *buf; @@ -39,6 +39,10 @@ struct hexedit *hexedit_new(TALLOC_CTX *ctx, WINDOW *parent, int nlines, goto fail; } + if (data) { + memcpy(buf->data, data, sz); + } + buf->len = sz; buf->alloc_size = sz; buf->win = derwin(parent, nlines, LINE_WIDTH, y, x); |