Warn about placeholders at the beginning.
[jmdict-cli.git] / kana2romaji.cpp
index 99591ebdbb1de530f2f72356710ddc668d6805ca..f596be4ec8c31e2e9b18010e42e50b2fa8b1eaec 100644 (file)
@@ -414,6 +414,11 @@ void kana2romaji(const string& kana, string& rom) {
                   continue;
                }
             }
+            else
+            {
+              cout << "Encountered a placeholder at the beginning. Just removing it." << endl;
+              rom.erase(pos);
+            }
         }
         // FIXME!
         else if (rom[pos] == '\2' && pos + 1 < rom.size())