From: Gert van Valkenhoef Date: Fri, 12 Aug 2011 16:32:50 +0000 (+0200) Subject: Read NIL stores correctly X-Git-Url: https://deadsoftware.ru/gitweb?p=odcread.git;a=commitdiff_plain;h=98bcd76b4c284676f55d754879dee9bda1898924 Read NIL stores correctly --- 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