mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
FIXED - bug 284888: When I do "extract method" I get a "String index out of range: -1" error
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284888
This commit is contained in:
parent
fb29ac3b16
commit
df498b476f
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
|
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik
|
||||||
* Rapperswil, University of applied sciences and others
|
* Rapperswil, University of applied sciences and others
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
@ -564,6 +564,7 @@ public class ChangeGenerator extends CPPASTVisitor {
|
||||||
do {
|
do {
|
||||||
if (lastCommonPosition >= 0
|
if (lastCommonPosition >= 0
|
||||||
&& lastCommonPositionInOriginal >= 0
|
&& lastCommonPositionInOriginal >= 0
|
||||||
|
&& lastCommonPositionInOriginal - korOffset >= 0
|
||||||
&& originalCode.charAt(lastCommonPositionInOriginal
|
&& originalCode.charAt(lastCommonPositionInOriginal
|
||||||
- korOffset) == reverseSynthCode
|
- korOffset) == reverseSynthCode
|
||||||
.charAt(lastCommonPosition)) {
|
.charAt(lastCommonPosition)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue