From 6fe13fc2b7c0ea7cb05839a1ebd71cb2e157d411 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 14 Mar 2018 17:39:31 +0530 Subject: [PATCH] fix insertion to account for chains --- lib/risc/instruction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/risc/instruction.rb b/lib/risc/instruction.rb index 26d7f8cd..97f1c31d 100644 --- a/lib/risc/instruction.rb +++ b/lib/risc/instruction.rb @@ -48,7 +48,7 @@ module Risc # instruction along to the given ones's next. # ie insert into the linked list that the instructions form def insert instruction - instruction.set_next @next + instruction.last.set_next @next @next = instruction end