summaryrefslogtreecommitdiff
path: root/unoidl/source/unoidlprovider.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-08 17:29:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-08 17:30:53 +0200
commit1ad700f5a449aeee1dfbbb5ae37b3bf43638d394 (patch)
tree0aaeeb1d9b73a08fc8b184d85aebcf7ce6b63b02 /unoidl/source/unoidlprovider.cxx
parent79774d961644ea81b4e790114c9b785d38bcd8a4 (diff)
Minor improvements to UNOIDL binary format
Change-Id: Ia215b34842ce85bfbd1ad90a286abcbae0884bd5
Diffstat (limited to 'unoidl/source/unoidlprovider.cxx')
-rw-r--r--unoidl/source/unoidlprovider.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/unoidl/source/unoidlprovider.cxx b/unoidl/source/unoidlprovider.cxx
index 6ead9cfd64d2..33848a1c632e 100644
--- a/unoidl/source/unoidlprovider.cxx
+++ b/unoidl/source/unoidlprovider.cxx
@@ -1058,11 +1058,12 @@ rtl::Reference< Entity > readEntity(
UnoidlProvider::UnoidlProvider(OUString const & uri):
file_(new detail::MappedFile(uri))
{
- if (file_->size < 8 || std::memcmp(file_->address, "UNOIDL\0\xFF", 8) != 0)
+ if (file_->size < 8 || std::memcmp(file_->address, "UNOIDL\xFF\0", 8) != 0)
{
throw FileFormatException(
file_->uri,
- "UNOIDL format: does not begin with magic UNOIDL\\0\\xFF");
+ "UNOIDL format: does not begin with magic UNOIDL\\xFF and version"
+ " 0");
}
sal_uInt32 off = file_->read32(8);
mapSize_ = file_->read32(12);