File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -316,11 +316,21 @@ struct ParseEvent {
316
316
case Cmd::Maniac_ShowStringPicture: {
317
317
// Show String Picture
318
318
add_evt_entry ();
319
- auto tokens = Utils::Split (lcf::ToString (estring), ' \x01 ' );
320
- if (tokens.size () >= 4 ) {
319
+
320
+ if (!estring.empty () && estring[0 ] == ' \x01 ' ) {
321
+ std::string term = " " ;
322
+
323
+ for (size_t i = 1 ; i < estring.size (); ++i) {
324
+ char c = estring[i];
325
+ if (c == ' \x01 ' || c == ' \x02 ' || c == ' \x03 ' ) {
326
+ break ;
327
+ }
328
+ term += c;
329
+ }
330
+
321
331
info.push_back (make_info (ctx));
322
332
info.push_back (" Show String Picture" );
323
- for (auto & line: Utils::Split (tokens[ 1 ] , ' \n ' )) {
333
+ for (auto & line: Utils::Split (term , ' \n ' )) {
324
334
lines.push_back (Utils::RemoveControlChars (line));
325
335
}
326
336
context = " strpic" ;
@@ -537,7 +547,7 @@ Translation Translation::fromPO(const std::string& filename) {
537
547
continue ;
538
548
}
539
549
std::cerr << " Parse error (Line " << line_number << " ): Expected \" , got " << c << " : " << line << " \n " ;
540
- return " " ;
550
+ return " " ;
541
551
}
542
552
543
553
if (!slash && c == ' \\ ' ) {
You can’t perform that action at this time.
0 commit comments