diff --git a/libyasm/bc-data.c b/libyasm/bc-data.c index 5c6f7fca..6e025c53 100644 --- a/libyasm/bc-data.c +++ b/libyasm/bc-data.c @@ -300,6 +300,8 @@ yasm_bc_create_data(yasm_datavalhead *datahead, unsigned int size, &dvo->data.raw.contents[len], 1); } else { + if (len > 0) + dvo = STAILQ_NEXT(dvo, link); dvo->type = dv->type; dvo->data.val = dv->data.val; /* structure copy */ dvo->data.val.size = size*8; /* remember size */ diff --git a/libyasm/tests/Makefile.inc b/libyasm/tests/Makefile.inc index f34f651c..d53e3185 100644 --- a/libyasm/tests/Makefile.inc +++ b/libyasm/tests/Makefile.inc @@ -12,6 +12,8 @@ EXTRA_DIST += libyasm/tests/absloop-err.asm EXTRA_DIST += libyasm/tests/absloop-err.errwarn EXTRA_DIST += libyasm/tests/charconst64.asm EXTRA_DIST += libyasm/tests/charconst64.hex +EXTRA_DIST += libyasm/tests/data-rawvalue.asm +EXTRA_DIST += libyasm/tests/data-rawvalue.hex EXTRA_DIST += libyasm/tests/duplabel-err.asm EXTRA_DIST += libyasm/tests/duplabel-err.errwarn EXTRA_DIST += libyasm/tests/emptydata.asm diff --git a/libyasm/tests/data-rawvalue.asm b/libyasm/tests/data-rawvalue.asm new file mode 100644 index 00000000..3ebc7d0c --- /dev/null +++ b/libyasm/tests/data-rawvalue.asm @@ -0,0 +1,3 @@ +x db 0 +dd 0,x,0 + diff --git a/libyasm/tests/data-rawvalue.hex b/libyasm/tests/data-rawvalue.hex new file mode 100644 index 00000000..089b49c8 --- /dev/null +++ b/libyasm/tests/data-rawvalue.hex @@ -0,0 +1,13 @@ +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00