Don't try to modify something that doesn't exist
authorJoey Schulze <joey@infodrom.org>
Wed, 27 Feb 2008 19:01:58 +0000 (19:01 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 27 Feb 2008 19:01:58 +0000 (19:01 +0000)
src/InfoCon/buch/infocon

index 35b9d8e..9aa76c6 100755 (executable)
@@ -237,7 +237,7 @@ sub read_input
     } elsif ($ans eq ".") {
        $ans = '';
     }
     } elsif ($ans eq ".") {
        $ans = '';
     }
-    $ans =~ s/ *$//;
+    $ans =~ s/ *$// if $ans;
     return $ans;
 }
 
     return $ans;
 }