[Libreoffice] [REVIEWED] [PUSHED] Proper initialization and copying of union matrix value.

Tor Lillqvist tlillqvist at novell.com
Thu May 12 22:40:59 PDT 2011

> I'd like to commit the attached patch to the 3.4 branch.  This was
> discovered by the unit test which failed when an empty matrix element
> didn't have a value of 0.0.  As it turned out, I was initializing the
> higher 4 bytes via 32-bit pointer but the lower 4 bytes were left
> un-initialized, which caused the double value to become non-zero.
> Apparently this doesn't happen when building a 64-bit build.

This indeed avoids the assertion failure in the unit test. I first tried a change to initialising the fVal and not pS only in the no-argument constructor, but that didn't help. Kohei's additional changes to the copy constructor and operator= did help, great! Pushed.


More information about the LibreOffice mailing list