aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_receive.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-05-24 08:41:30 +0200
committerBjörn Gustavsson <[email protected]>2016-05-25 16:41:26 +0200
commitbb468eab3064d1e8bec5d6c6f53c60ccce2c9dc2 (patch)
tree503501fb04e438ab5a64d31cbe95fcc7f4b9866a /lib/compiler/src/beam_receive.erl
parentad9ff167ab254993597ffaa84256bac0bdf5520e (diff)
downloadotp-bb468eab3064d1e8bec5d6c6f53c60ccce2c9dc2.tar.gz
otp-bb468eab3064d1e8bec5d6c6f53c60ccce2c9dc2.tar.bz2
otp-bb468eab3064d1e8bec5d6c6f53c60ccce2c9dc2.zip
beam_receive: Don't crash when encountering nonsensical code
Diffstat (limited to 'lib/compiler/src/beam_receive.erl')
-rw-r--r--lib/compiler/src/beam_receive.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_receive.erl b/lib/compiler/src/beam_receive.erl
index c593184746..89cafe27ce 100644
--- a/lib/compiler/src/beam_receive.erl
+++ b/lib/compiler/src/beam_receive.erl
@@ -177,7 +177,8 @@ opt_recv([I|Is], D, R0, L0, Acc) ->
no;
false ->
opt_recv(Is, D, R, L, [I|Acc])
- end.
+ end;
+opt_recv([], _, _, _, _) -> no.
opt_update_regs({block,Bl}, R, L) ->
{opt_update_regs_bl(Bl, R),L};