Changeset 186:ee3ee677f5fc
- Timestamp:
- 03/10/08 12:00:00
(9 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Fix several string convertion indexing errors, thanks Zhiguang Liang for the fixes
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r164 |
r186 |
|
| 2299 | 2299 | TCHAR[] buffer = new TCHAR [ length_ + 1]; |
|---|
| 2300 | 2300 | OS.GetWindowText (hwndText, buffer.ptr, length_ + 1); |
|---|
| 2301 | | newText = TCHARsToStr( buffer[newStart .. newEnd - newStart ] ); |
|---|
| | 2301 | newText = TCHARsToStr( buffer[newStart .. newEnd ] ); |
|---|
| 2302 | 2302 | } else { |
|---|
| 2303 | 2303 | newText = ""; |
|---|
| r117 |
r186 |
|
| 384 | 384 | int end = start; |
|---|
| 385 | 385 | while (end < buffer.length && buffer[end] !is 0) end++; |
|---|
| 386 | | char[] string = TCHARsToStr( buffer[ start .. end - start ] ); |
|---|
| | 386 | char[] string = TCHARsToStr( buffer[ start .. end ] ); |
|---|
| 387 | 387 | start = end; |
|---|
| 388 | 388 | if (count is fileNames.length) { |
|---|
| r122 |
r186 |
|
| 1234 | 1234 | TCHAR[] buffer = NewTCHARs (getCodePage (), length_ + 1); |
|---|
| 1235 | 1235 | OS.GetWindowText (hwndText, buffer.ptr, length_ + 1); |
|---|
| 1236 | | newText = TCHARsToStr( buffer[ newStart .. newEnd - newStart ] ); |
|---|
| | 1236 | newText = TCHARsToStr( buffer[ newStart .. newEnd ] ); |
|---|
| 1237 | 1237 | } else { |
|---|
| 1238 | 1238 | newText = ""; |
|---|
| r117 |
r186 |
|
| 973 | 973 | TCHAR[] buffer = NewTCHARs (getCodePage (), length + 1); |
|---|
| 974 | 974 | OS.GetWindowText (handle, buffer.ptr, length + 1); |
|---|
| 975 | | return TCHARsToStr( buffer[ start .. end - start ] ); |
|---|
| | 975 | return TCHARsToStr( buffer[ start .. end ] ); |
|---|
| 976 | 976 | } |
|---|
| 977 | 977 | |
|---|
| … | … | |
| 2319 | 2319 | TCHAR[] buffer = NewTCHARs (getCodePage (), length + 1); |
|---|
| 2320 | 2320 | OS.GetWindowText (handle, buffer.ptr, length + 1); |
|---|
| 2321 | | newText = TCHARsToStr( buffer[ newStart .. newEnd - newStart] ); |
|---|
| | 2321 | newText = TCHARsToStr( buffer[ newStart .. newEnd ] ); |
|---|
| 2322 | 2322 | } else { |
|---|
| 2323 | 2323 | newText = ""; |
|---|