Skip to content

Commit

Permalink
fix for sequential ruby texts
Browse files Browse the repository at this point in the history
  • Loading branch information
shiiion committed Jan 24, 2020
1 parent c7776dc commit 5425c35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions steinsgatetextractor/sg_text_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace {
target_str = unformatted_text;
break;
case ACHIEVE_WORD_TAG:
cur_index = skip_achievement_tag(cur_index);
cur_index = skip_achievement_tag(cur_index + 1);
break;
case RUBY_FORMAT_START_TAG:
if (syllabized_words) {
Expand Down Expand Up @@ -460,7 +460,7 @@ void SGMainText::get_formatted_string(std::wstring& str_out) const {

if (_ruby_enabled) {
for (size_t i = 0, ruby_idx = 0; i < unformatted_text.size(); i++) {
if (ruby_idx < syllabized_words.size() &&
while (ruby_idx < syllabized_words.size() &&
syllabized_words[ruby_idx].insert_point == i) {
str_builder << syllabized_words[ruby_idx].word << L"(" <<
syllabized_words[ruby_idx].ruby << L")";
Expand Down

0 comments on commit 5425c35

Please sign in to comment.