diff --git a/aegisub/src/subtitle_format_ebu3264.cpp b/aegisub/src/subtitle_format_ebu3264.cpp index a5ff8b6ee..dd7901150 100644 --- a/aegisub/src/subtitle_format_ebu3264.cpp +++ b/aegisub/src/subtitle_format_ebu3264.cpp @@ -291,7 +291,7 @@ namespace continue; // add first part of text to current part - cur_row->back().text.append(text.substr(start, i)); + cur_row->back().text.append(begin(text) + start, begin(text) + i); // process special character if (text[i] == '\\' && (text[i + 1] == 'N' || wrap_mode == 1)) @@ -311,7 +311,7 @@ namespace } // add the remaining text - cur_row->back().text.append(text.substr(start)); + cur_row->back().text.append(begin(text) + start, end(text)); // convert \h to regular spaces // done after parsing so that words aren't split on \h