aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-05-06 17:43:09 +0200
committerFredrik Gustafsson <[email protected]>2013-05-06 17:43:09 +0200
commit22f01b438963ac158af3d8066e58ce54be22d2de (patch)
treeb6f82d7f6a23a39a1bed0e9bad11075b775833ae /erts/emulator/beam/beam_load.c
parent5bb42a3018c6d6e1bcaa382db8b873d1cef3c086 (diff)
parentea3024202d8dfedfafa62a15286157d3843957cb (diff)
downloadotp-22f01b438963ac158af3d8066e58ce54be22d2de.tar.gz
otp-22f01b438963ac158af3d8066e58ce54be22d2de.tar.bz2
otp-22f01b438963ac158af3d8066e58ce54be22d2de.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index bd4e5a52d0..4193eb4f3f 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -2964,19 +2964,19 @@ gen_put_integer(LoaderState* stp, GenOpArg Fail, GenOpArg Size,
NEW_GENOP(stp, op);
NATIVE_ENDIAN(Flags);
- if (Size.type == TAG_i && Size.val < 0) {
- error:
/* Negative size must fail */
- op->op = genop_badarg_1;
- op->arity = 1;
- op->a[0] = Fail;
- } else if (Size.type == TAG_i) {
+ if (Size.type == TAG_i) {
op->op = genop_i_new_bs_put_integer_imm_4;
op->arity = 4;
op->a[0] = Fail;
op->a[1].type = TAG_u;
if (!safe_mul(Size.val, Unit.val, &op->a[1].val)) {
- goto error;
+ error:
+ op->op = genop_badarg_1;
+ op->arity = 1;
+ op->a[0] = Fail;
+ op->next = NULL;
+ return op;
}
op->a[1].val = Size.val * Unit.val;
op->a[2].type = Flags.type;