func.sh: Fix a potential infinite loop in mendel_readsym_target
This commit is contained in:
parent
7198021f4a
commit
da2a9c3d56
2
func.sh
2
func.sh
|
|
@ -283,7 +283,7 @@ mendel_readsym_target() {
|
|||
local val=$(mendel_readsym "$sym")
|
||||
if [ -n "$val" ]
|
||||
then
|
||||
perl -e '@a = qw/X Y Z E F/; $c = 0; while (length $ARGV[0]) { $ARGV[0] =~ s#^(..)(..)(..)(..)##; printf "%s: %d\n", $a[$c], hex "0x$4$3$2$1"; $c++; }' "$val"
|
||||
perl -e '@a = qw/X Y Z E F/; $c = 0; while (length $ARGV[0]) { last unless $ARGV[0] =~ s#^(..)(..)(..)(..)##; printf "%s: %d\n", $a[$c], hex "0x$4$3$2$1"; $c++; }' "$val"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue