diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-15 13:47:09 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-10-15 19:55:18 +0000 |
commit | a16d55f9b0207dadf96c41a1581a649e67a921ad (patch) | |
tree | 25c3ba28b91eb5e13d15c1f62090ca394fea5b95 | |
parent | 33028a6362527537899f92eb5f1ca77ea2198544 (diff) |
Resolves: fdo#85032 max len property of -1 -> crash
Change-Id: Ief903c619204f01784e93fd5e2d582632cef032e
(cherry picked from commit e45136f1ff9d817dfec27a6a20ba29fffc6c54bf)
Reviewed-on: https://gerrit.libreoffice.org/11987
Reviewed-by: Matthew Francis <mjay.francis@gmail.com>
Tested-by: Matthew Francis <mjay.francis@gmail.com>
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | vcl/source/control/edit.cxx | 2 |
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 ); |