From 456fdda6c2eccb89ddd4da13a7f86be5959d5d13 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 22 Jul 2017 15:40:22 -0400 Subject: [PATCH] Ensured that the mark_end step can't overwrite another recognised symbol. --- Storage/Tape/Parsers/TapeParser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Tape/Parsers/TapeParser.hpp b/Storage/Tape/Parsers/TapeParser.hpp index c696b205d..4ae1d092f 100644 --- a/Storage/Tape/Parsers/TapeParser.hpp +++ b/Storage/Tape/Parsers/TapeParser.hpp @@ -35,7 +35,7 @@ template class Parser { while(!has_next_symbol_ && !tape->is_at_end()) { process_pulse(tape->get_next_pulse()); } - if(tape->is_at_end()) mark_end(); + if(!has_next_symbol_ && tape->is_at_end()) mark_end(); has_next_symbol_ = false; return next_symbol_; }