diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-23 17:06:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-24 07:55:23 +0100 |
commit | 58401e6c8a9f53df96e84d3e1b73c84150890102 (patch) | |
tree | 57e7028ee0499011917190bc41e7105485d5d9d7 /sw | |
parent | da67b0be49795ec09a2794dd0fb3e5b29f066dc3 (diff) |
This presumably always wanted to check for SAL_MAX_UINT16, not USHRT_MAX
The check against USHRT_MAX was introduced together with a following
nLen2 = static_cast<UINT16>(nLen);
in 73f043c441af59da02c160d441b18a73725e62e4 "#96155# #i1858# merge branch and
remove warnings" (and that UINT16 meanwhile replaced with sal_uInt16).
Change-Id: I61346e4ffc90a4f8a97c2d3f822d619faa5b0008
Reviewed-on: https://gerrit.libreoffice.org/48441
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 5cbaefdfd6fd..03696fb5208f 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4170,8 +4170,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen { OSL_ENSURE(nLen2 == nLen, "Fib length and read length are different"); - if (nLen > USHRT_MAX) - nLen = USHRT_MAX; + if (nLen > SAL_MAX_UINT16) + nLen = SAL_MAX_UINT16; else if (nLen < 2 ) nLen = 2; nLen2 = static_cast<sal_uInt16>(nLen); |