[Liblas-commits] hg: preserve previous gap in situations where the
header's offse...
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Jun 24 17:05:23 EDT 2011
details: http://hg.liblas.orghg/rev/fef2b1b73755
changeset: 3017:fef2b1b73755
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jun 24 16:05:17 2011 -0500
description:
preserve previous gap in situations where the header's offset is no longer large enough to contain VLRs #239
diffstat:
src/detail/writer/header.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 91f2d3e1e0ab -r fef2b1b73755 src/detail/writer/header.cpp
--- a/src/detail/writer/header.cpp Fri Jun 24 15:21:43 2011 -0500
+++ b/src/detail/writer/header.cpp Fri Jun 24 16:05:17 2011 -0500
@@ -168,12 +168,13 @@
if (difference <= 0)
{
int32_t d = abs(difference);
+ int32_t padding_from_before = m_header.GetDataOffset() - m_header.GetHeaderSize();
if (m_header.GetVersionMinor() == 0)
{
// Add the two extra bytes for the 1.0 pad
d = d + 2;
}
- m_header.SetDataOffset(m_header.GetDataOffset() + d );
+ m_header.SetDataOffset(m_header.GetDataOffset() + d + padding_from_before);
}
}
More information about the Liblas-commits
mailing list