diff -Nru a/typescript2txt.cpp b/typescript2txt.cpp
--- a/typescript2txt.cpp	2011-11-17 21:34:47.000000000 +0100
+++ b/typescript2txt.cpp	2016-03-29 14:50:25.858971500 +0200
@@ -679,6 +679,7 @@
 };
 
 void Reader::read_from(std::istream& in){
+  state = SAW_NOTHING;
   while(in){
     RState next_state = SAW_NOTHING;
     int tmp_val;
