From 131159c9741abcf01451bf5f0316db1313dd9473 Mon Sep 17 00:00:00 2001 From: GilmarSantosJr Date: Tue, 5 May 2009 02:44:37 +0000 Subject: [PATCH] Item1566: fix infinite loop git-svn-id: http://svn.foswiki.org/trunk@3816 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- core/lib/Foswiki/Prefs.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/lib/Foswiki/Prefs.pm b/core/lib/Foswiki/Prefs.pm index c5da720782..5dc67eeb9a 100644 --- a/core/lib/Foswiki/Prefs.pm +++ b/core/lib/Foswiki/Prefs.pm @@ -262,7 +262,8 @@ sub _restore { foreach ( keys %{ $this->{'map'} } ) { $this->{'map'}{$_} &= $mask; substr( $this->{'map'}{$_}, -1 ) = '' - while ord( substr( $this->{'map'}{$_}, -1 ) ) == 0; + while length( $this->{'map'}{$_} ) > 0 + && ord( substr( $this->{'map'}{$_}, -1 ) ) == 0; delete $this->{'map'}{$_} if length( $this->{'map'}{$_} ) == 0; }