Another RRegArena bugfix

This commit is contained in:
pancake 2013-08-29 17:12:13 +02:00
parent 341da1d154
commit 87a63e5a02

View File

@ -16,8 +16,9 @@ R_API ut8* r_reg_get_bytes(RReg *reg, int type, int *size) {
arena = reg->regset[i].arena;
sz += arena->size;
buf = realloc (buf, sz);
memcpy (buf+osize, arena->bytes, arena->size-osize);
osize += sz;
if (!buf) break;
memcpy (buf+osize, arena->bytes, arena->size);
osize = sz;
}
if (size)
*size = sz;