Changeset 830 for trunk/src/detail/reader11.cpp
- Timestamp:
- 08/17/08 00:12:18 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/detail/reader11.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/detail/reader11.cpp
r816 r830 311 311 uint32_t count = header.GetRecordsCount(); 312 312 header.SetRecordsCount(0); 313 313 314 for (uint32_t i = 0; i < count; ++i) 314 315 { 316 315 317 read_n(vlrh, m_ifs, sizeof(VLRHeader)); 316 317 int16_t count = vlrh.recordLengthAfterHeader; 318 319 320 uint16_t length = vlrh.recordLengthAfterHeader; 321 322 if (length < 1) { 323 throw std::domain_error("VLR record length must be at least 1 byte long"); 324 } 318 325 319 326 std::vector<uint8_t> data; 320 data.resize( count);321 322 read_n(data.front(), m_ifs, count);323 327 data.resize(length); 328 329 read_n(data.front(), m_ifs, length); 330 324 331 LASVLR vlr; 325 332 vlr.SetReserved(vlrh.reserved); … … 331 338 332 339 header.AddVLR(vlr); 333 } 334 340 341 } 342 335 343 return true; 336 344 }
