Don't assume override blocks always start with a backslash, since many people use them for comments

Originally committed to SVN as r1202.
This commit is contained in:
Dan Donovan 2007-06-03 00:37:49 +00:00
parent 5a4e03312a
commit 50aab0f08f
1 changed files with 5 additions and 1 deletions

View File

@ -112,9 +112,11 @@ void AssDialogueBlockOverride::ParseTags () {
// Initialize tokenizer
wxStringTokenizer tkn(text,_T("\\"),wxTOKEN_RET_EMPTY_ALL);
wxString curTag;
if (text.StartsWith(_T("\\"))) curTag = _T("\\");
while (tkn.HasMoreTokens()) {
wxString curTag = _T("\\");
//curTag will always start with a backslash after first loop - see end of loop
curTag += tkn.GetNextToken();
if (curTag == _T("\\")) continue;
@ -130,6 +132,8 @@ void AssDialogueBlockOverride::ParseTags () {
AssOverrideTag *newTag = new AssOverrideTag;
newTag->SetText(curTag);
Tags.push_back(newTag);
curTag = _T("\\");
}
}