diff options
| author | Niraj Modi | 2017-07-14 16:10:51 +0000 |
|---|---|---|
| committer | Niraj Modi | 2017-08-07 08:20:21 +0000 |
| commit | aeb34d530d5752c1b765fc30cc81a7ae32768b82 (patch) | |
| tree | f898f3e6515162e77cb0dcf6bf45d33eb8006c37 | |
| parent | a9c180e4c7ea46eb4c50d4bb8c408bf7cd985d12 (diff) | |
| download | eclipse.platform.swt-aeb34d530d5752c1b765fc30cc81a7ae32768b82.tar.gz eclipse.platform.swt-aeb34d530d5752c1b765fc30cc81a7ae32768b82.tar.xz eclipse.platform.swt-aeb34d530d5752c1b765fc30cc81a7ae32768b82.zip | |
Bug 500832 - [Win32] StringIndexOutOfBoundsException below
Table.wmNotifyChild (thrown in String.getChars)
Change-Id: I0481635eeaf599fb2be22a0f203724d6bed24ea7
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java index 06489ffb6a..46f8c7cd3a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java @@ -7011,7 +7011,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) { * from drawing the selection when LVS_EX_FULLROWSELECT * is set. */ - int length = Math.min (string.length (), plvfi.cchTextMax - 1); + int length = Math.min (string.length (), Math.max (0, plvfi.cchTextMax - 1)); if (!tipRequested && plvfi.iSubItem == 0 && length == 0) { string = " "; //$NON-NLS-1$ length = 1; |
