diff options
author | Sergey Prigogin | 2008-04-01 06:24:44 +0000 |
---|---|---|
committer | Sergey Prigogin | 2008-04-01 06:24:44 +0000 |
commit | d0325299ce2033337892996e1b49e74bff20560e (patch) | |
tree | 6d7674a1bc41e0de405d031d7364d23d13ed7305 /core/org.eclipse.cdt.core | |
parent | 043d8481063aafe8bd89cb6f165508f81eee670c (diff) | |
download | org.eclipse.cdt-d0325299ce2033337892996e1b49e74bff20560e.tar.gz org.eclipse.cdt-d0325299ce2033337892996e1b49e74bff20560e.tar.xz org.eclipse.cdt-d0325299ce2033337892996e1b49e74bff20560e.zip |
Fixed another corner case of bug 224817.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java index 66ceb42ca42..30828f81305 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java @@ -757,11 +757,11 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { } private int findIncludePos(String[] paths, File currentDirectory) { - for (int i = 0; i < paths.length; ++i) { - File pathDir = new File(paths[i]); - for (File dir = currentDirectory; dir != null; dir = dir.getParentFile()) { - if (dir.equals(pathDir)) - return i; + for (; currentDirectory != null; currentDirectory = currentDirectory.getParentFile()) { + for (int i = 0; i < paths.length; ++i) { + File pathDir = new File(paths[i]); + if (currentDirectory.equals(pathDir)) + return i; } } |