1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +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:
Emanuel Graf 2009-07-29 07:17:03 +00:00
parent fb29ac3b16
commit df498b476f

View file

@ -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
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@ -564,6 +564,7 @@ public class ChangeGenerator extends CPPASTVisitor {
do {
if (lastCommonPosition >= 0
&& lastCommonPositionInOriginal >= 0
&& lastCommonPositionInOriginal - korOffset >= 0
&& originalCode.charAt(lastCommonPositionInOriginal
- korOffset) == reverseSynthCode
.charAt(lastCommonPosition)) {