File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -316,11 +316,21 @@ struct ParseEvent {
316316 case Cmd::Maniac_ShowStringPicture: {
317317 // Show String Picture
318318 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+
321331 info.push_back (make_info (ctx));
322332 info.push_back (" Show String Picture" );
323- for (auto & line: Utils::Split (tokens[ 1 ] , ' \n ' )) {
333+ for (auto & line: Utils::Split (term , ' \n ' )) {
324334 lines.push_back (Utils::RemoveControlChars (line));
325335 }
326336 context = " strpic" ;
@@ -537,7 +547,7 @@ Translation Translation::fromPO(const std::string& filename) {
537547 continue ;
538548 }
539549 std::cerr << " Parse error (Line " << line_number << " ): Expected \" , got " << c << " : " << line << " \n " ;
540- return " " ;
550+ return " " ;
541551 }
542552
543553 if (!slash && c == ' \\ ' ) {
You can’t perform that action at this time.
0 commit comments