make_makefile_swig sometimes goes into infinite loop #561

Found a similar loop in make_makefile_src that can go into an infinite loop.
This commit is contained in:
Alex Lin 2018-02-09 10:14:49 -06:00
parent 7a3fc1353e
commit 8be09638e7

View File

@ -133,7 +133,7 @@ if (scalar @exclude_dirs) {
# Error check - delete any element that is null
# (note: sort forced all blank names to front of array
@exclude_dirs = map { s/(^\s+|\s+$)//g ; $_ } @exclude_dirs ;
while ( not length @exclude_dirs[0] ) {
while ( scalar @exclude_dirs and not length @exclude_dirs[0] ) {
# Delete an element from the left side of an array (element zero)
shift @exclude_dirs ;
}