unification of bug fixes 1198893, 1404228
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / FastJavaPartitionScanner.java
index 559dc88..d9e8c7f 100644 (file)
@@ -203,7 +203,9 @@ public class FastJavaPartitionScanner implements IPartitionTokenScanner, IPHPPar
                                        }
                                        else {
                                                // bug #1404228: Crash on <?php // comment ?>
-                                               fScanner.unread();
+                                               if (nextch!=ICharacterScanner.EOF) {
+                                                       fScanner.unread();
+                                               }
                                        }
                                }