From 98bcd76b4c284676f55d754879dee9bda1898924 Mon Sep 17 00:00:00 2001 From: Gert van Valkenhoef Date: Fri, 12 Aug 2011 18:32:50 +0200 Subject: [PATCH] Read NIL stores correctly --- reader.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reader.cc b/reader.cc index 1f60ce8..f53e30a 100644 --- a/reader.cc +++ b/reader.cc @@ -120,6 +120,14 @@ Store* Reader::readStore() { // kind: SHORTCHAR; path: TypePath; type: TypeName; // save: ReaderState; Store *Reader::readNilStore() { + INTEGER comment = readInt(); + std::streamoff next = readInt(); + d_state->end = d_rider.tellg(); + if (next > 0 || (next == 0 && comment % 2 == 1)) { + d_state->next = d_state->end + next; + } else { + d_state->next = 0; + } return 0; } // IF kind = nil THEN -- 2.29.2