File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ namespace osmium {
124124 if (!osmium::io::detail::read_exactly (m_fd, buffer.data (), static_cast <unsigned int >(buffer.size ()))) {
125125 return 0 ; // EOF
126126 }
127+
128+ if (m_offset_ptr) {
129+ *m_offset_ptr += buffer.size ();
130+ }
131+
127132 return check_size (get_size_in_network_byte_order (buffer.data ()));
128133 }
129134
@@ -210,6 +215,10 @@ namespace osmium {
210215 if (!osmium::io::detail::read_exactly (m_fd, &*buffer.begin (), static_cast <unsigned int >(size))) {
211216 throw osmium::pbf_error{" unexpected EOF" };
212217 }
218+
219+ if (m_offset_ptr) {
220+ *m_offset_ptr += buffer.size ();
221+ }
213222 } else {
214223 ensure_available_in_input_queue (size);
215224 buffer.append (m_input_buffer, 0 , size);
You can’t perform that action at this time.
0 commit comments