Browse Source

Fix another log string formatting issue found by Adam.

(cherry picked from commit 9e308cbebe)
working_subtitles
ZarothYe 3 years ago committed by rarified
parent
commit
6678ab215c
  1. 5
      Sources/Plasma/PubUtilLib/plAudioCore/plSrtFileReader.cpp

5
Sources/Plasma/PubUtilLib/plAudioCore/plSrtFileReader.cpp

@ -109,10 +109,9 @@ bool plSrtFileReader::ReadFile()
if (std::regex_match(line, matches, speakerTextRegex)) { if (std::regex_match(line, matches, speakerTextRegex)) {
if (matches.size() < 5) { if (matches.size() < 5) {
// add error message and ensure this subtitle line won't be added to the entries // add error message and ensure this subtitle line won't be added to the entries
plStatusLog::AddLineS("audio.log", plStatusLog::kRed, " Subtitle text and/or speaker name '{}' are formatted incorrectly.", line); plStatusLog::AddLineS("audio.log", plStatusLog::kRed, " Subtitle text and/or speaker name '%s' are formatted incorrectly.", line);
subtitleNumber = 0; subtitleNumber = 0;
} } else {
else {
// matches[0] is the entire match, we don't do anything with it // matches[0] is the entire match, we don't do anything with it
// matches[2] is the second group (the optional subtitle speaker with colon but no space at the end) // matches[2] is the second group (the optional subtitle speaker with colon but no space at the end)
speakerName = matches[2]; speakerName = matches[2];

Loading…
Cancel
Save