summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-04-15 11:02:27 +0200
committerDavid Tardon <dtardon@redhat.com>2017-04-15 11:02:27 +0200
commit511dcb3dd6525f501ebed2f3f33472982972e34e (patch)
treeb4c6a1f97b1fe97e03e362b428ae721fef397664
parentd23fcf032369c9d68ce0d8e2262e3f25a5a83342 (diff)
explain what is being done
Change-Id: I9036aba359ce62bd7b3cbbd912626dcc12f7819f
-rw-r--r--src/lib/VSDContentCollector.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index 34192bd..dd5ef82 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -84,7 +84,8 @@ unsigned computeBMPDataOffset(librevenge::RVNGInputStream *const input, const un
// determine palette size
input->seek(10, librevenge::RVNG_SEEK_CUR);
unsigned bpp = readU16(input);
- // sanitize bpp
+ // sanitize bpp - limit to the allowed range and then round up to one
+ // of the allowed values
if (bpp > 32)
bpp = 32;
const unsigned allowedBpp[] = {1, 4, 8, 16, 24, 32};