Commits

David McClosky  committed 6d31ec9

Fix my previous fix for issue #3 which wasn't properly accounting for the contents of savedWrd_.

  • Participants
  • Parent commits bc8d323

Comments (0)

Files changed (1)

File first-stage/PARSE/ewDciTokStrm.C

                    // will be empty only if the input stream has run dry.
 {
     if (nextWrd_ == "</s>") {
-        savedWrd_ = "";
-        nextWrd_ = "";
-        return "</s>";
+        if (savedWrd_.length()) { // return saved word first
+            ECString saved = savedWrd_;
+            savedWrd_ = "";
+            return saved;
+        } else {
+            nextWrd_ = "";
+            return "</s>";
+        }
     }
 
     if( !savedWrd_.length() )