summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-15 13:47:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-15 16:25:33 +0000
commit0c88c13e769bc4c521f3f966c02ea21a3cb8d928 (patch)
treedd957cb71b013fa36dbd2c856d514f0e8839286e
parentd89756854ed100ed27fda7a8a7716af74332c1a4 (diff)
Resolves: fdo#85032 max len property of -1 -> crash
Change-Id: Ief903c619204f01784e93fd5e2d582632cef032e (cherry picked from commit e45136f1ff9d817dfec27a6a20ba29fffc6c54bf) Reviewed-on: https://gerrit.libreoffice.org/11985 Reviewed-by: Matthew Francis <mjay.francis@gmail.com> Tested-by: Matthew Francis <mjay.francis@gmail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/control/edit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f117e3f73d9d..906355fca405 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2437,7 +2437,7 @@ bool Edit::IsInsertMode() const
void Edit::SetMaxTextLen(sal_Int32 nMaxLen)
{
- mnMaxTextLen = nMaxLen ? nMaxLen : EDIT_NOLIMIT;
+ mnMaxTextLen = nMaxLen > 0 ? nMaxLen : EDIT_NOLIMIT;
if ( mpSubEdit )
mpSubEdit->SetMaxTextLen( mnMaxTextLen );