summaryrefslogtreecommitdiff
path: root/Utils
diff options
context:
space:
mode:
authorcarlosg <carlosg>2006-11-15 18:17:13 +0000
committercarlosg <carlosg>2006-11-15 18:17:13 +0000
commit199f9ed75de138b4d996e275932778e094a59d93 (patch)
tree7dfebdfc4038d59c9557660c07834a90ade7ef66 /Utils
parent475d94a1364cb936911083ed2952669406e92f28 (diff)
2006-11-15 Carlos Garnacho <carlosg@gnome.org>
* Utils/Parse.pm (get_from_chatfile): * Utils/Replace.pm (set_chat): Fix infinite loop if the chatscript contains tabs. Fixes GNOME Bug #343193 (Kris Shannon)
Diffstat (limited to 'Utils')
-rw-r--r--Utils/Parse.pm4
-rw-r--r--Utils/Replace.pm2
2 files changed, 5 insertions, 1 deletions
diff --git a/Utils/Parse.pm b/Utils/Parse.pm
index e683d94..7a8fe03 100644
--- a/Utils/Parse.pm
+++ b/Utils/Parse.pm
@@ -737,6 +737,8 @@ sub get_from_chatfile
chomp;
while ($_ ne "")
{
+ s/^\s*//;
+
# If it uses quotes. FIXME: Assuming they surround the whole string.
if (/^\'/)
{
@@ -745,7 +747,7 @@ sub get_from_chatfile
}
else
{
- s/([^ \t]*) ?//;
+ s/(\S*)\s?//;
$found = $1;
}
diff --git a/Utils/Replace.pm b/Utils/Replace.pm
index 98680b8..c17dce1 100644
--- a/Utils/Replace.pm
+++ b/Utils/Replace.pm
@@ -480,6 +480,8 @@ sub set_chat
while ($i ne "")
{
+ $i =~ s/^\s*//;
+
# If it uses quotes. FIXME: Assuming they surround the whole string.
if ($i =~ /^\'/)
{