aboutsummaryrefslogtreecommitdiff
path: root/renrot
diff options
context:
space:
mode:
authorAndy Shevchenko <andy@smile.org.ua>2012-03-24 18:13:25 +0000
committerAndy Shevchenko <andy@smile.org.ua>2012-03-24 18:13:25 +0000
commit83c07bbb5f45cda4ef13b7b2090a86983018435e (patch)
tree38f3855029c61c89061271bcf725c9aa65eb6dc7 /renrot
parent9f7b7c3cc9ea8ed396d79cfa084d76ada60b5773 (diff)
downloadrenrot-83c07bbb5f45cda4ef13b7b2090a86983018435e.tar.gz
renrot-83c07bbb5f45cda4ef13b7b2090a86983018435e.tar.bz2
fix bug in trim_value()
The trim_value() doesn't match one-character values. Fix this by removing heading and trailing spaces separately. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> git-svn-id: file:///svnroot/renrot/trunk@599 fe2816f4-e837-0410-b10a-f608c9d244a1
Diffstat (limited to 'renrot')
-rwxr-xr-xrenrot3
1 files changed, 2 insertions, 1 deletions
diff --git a/renrot b/renrot
index 6aa9208..704a3bb 100755
--- a/renrot
+++ b/renrot
@@ -622,7 +622,8 @@ sub getOptions {
# See Also : N/A
sub trim_value {
my $value = shift;
- $value =~ s/\s*([^\s]+.*[^\s]+)\s*/$1/;
+ $value =~ s/^\s*//; # heading
+ $value =~ s/\s*$//; # trailing
return $value;
}

Return to:

Send suggestions and report system problems to the System administrator.