Skip to content

Commit

Permalink
Fixed bug where a newline in world.Execute is correctly processed.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Apr 2, 2011
1 parent 01a7858 commit 773ee3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripting/methods/methods_commands.cpp
Expand Up @@ -335,8 +335,11 @@ if (m_enable_command_stack &&

CStringList strList;

// change \r\n to \n
strFixedCommand.Replace (ENDLINE, "\n");

// break up command into a list, terminated by newlines
StringToList (strFixedCommand, ENDLINE, strList);
StringToList (strFixedCommand, "\n", strList);

// if list is empty, make sure we send at least one empty line
if (strList.IsEmpty ())
Expand Down

0 comments on commit 773ee3b

Please sign in to comment.