N_("expression must not contain floating point value"));
retval |= YASM_BC_RESOLVE_ERROR;
}
- } else
- bc->len *= yasm_intnum_get_uint(num);
+ } else {
+ if (yasm_intnum_sign(num) >= 0)
+ bc->len *= yasm_intnum_get_uint(num);
+ else
+ retval |= YASM_BC_RESOLVE_ERROR;
+ }
yasm_expr_destroy(temp);
}
if (!num)
yasm_internal_error(
N_("could not determine multiple in bc_tobytes"));
+ if (yasm_intnum_sign(num) < 0) {
+ yasm__error(bc->line, N_("multiple is negative"));
+ *bufsize = 0;
+ return NULL;
+ }
*multiple = yasm_intnum_get_uint(num);
if (*multiple == 0) {
*bufsize = 0;
EXTRA_DIST += libyasm/tests/incbin.asm
EXTRA_DIST += libyasm/tests/incbin.errwarn
EXTRA_DIST += libyasm/tests/incbin.hex
+EXTRA_DIST += libyasm/tests/timesover-err.asm
+EXTRA_DIST += libyasm/tests/timesover-err.errwarn
EXTRA_DIST += libyasm/tests/unary.asm
EXTRA_DIST += libyasm/tests/unary.errwarn
EXTRA_DIST += libyasm/tests/unary.hex