]> git.sesse.net Git - remoteglot/commitdiff
Strip trailing whitespace from engine ids (needed for Komodo).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Nov 2014 16:43:14 +0000 (17:43 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Nov 2014 16:43:14 +0000 (17:43 +0100)
Engine.pm

index 4d05750e187546e301b27319766cb2a9e0ce6322..c364ae5daff3a800082d5abb00c3d5cdc43a41b4 100644 (file)
--- a/Engine.pm
+++ b/Engine.pm
@@ -46,7 +46,7 @@ sub _anyevent_handle_line {
 
        if (!$engine->{'seen_uciok'}) {
                # Gobble up lines until we see uciok.
 
        if (!$engine->{'seen_uciok'}) {
                # Gobble up lines until we see uciok.
-               if ($line =~ /^id (\S+) (.*)$/) {
+               if ($line =~ /^id (\S+) (.*?)\s*$/) {
                        $engine->{'id'}->{$1} = $2;
                } elsif ($line =~ /^uciok$/) {
                        $engine->{'seen_uciok'} = 1;
                        $engine->{'id'}->{$1} = $2;
                } elsif ($line =~ /^uciok$/) {
                        $engine->{'seen_uciok'} = 1;