[Libreoffice] cppcheck detects division by 0 in sw/source/ui/vba/vbarows.cxx
Noel Power
nopower at novell.com
Mon Aug 15 02:19:37 PDT 2011
On 13/08/11 09:38, Julien Nabet wrote:
> Hello,
>
> cppcheck detects division by 0 in sw/source/ui/vba/vbarows.cxx, line 266
> I discussed this with Norbert on IRC, here what we propose to add
> before this line :
>
> if ((nNewWidth <= 0) || (nWidth <= 0))
> {
> OSL_ASSERT(!((nNewWidth <= 0) || (nWidth <= 0)));
> return;
> }
might be better to just throw a RuntimeException here
>
> Is this add ok ? (if yes, I can commit and push it on master).
sure, I would say go for it
Noel
More information about the LibreOffice
mailing list