mirror of
https://github.com/nasa/trick.git
synced 2024-12-21 14:07:51 +00:00
make_makefile_swig sometimes goes into infinite loop #561
Added a check to see if array has elements before we shift an empty array.
This commit is contained in:
parent
049c9a3207
commit
3ac538775b
@ -27,7 +27,7 @@ sub get_paths {
|
||||
# trim whitespace
|
||||
@paths = map { s/(^\s+|\s+$)//g ; $_ } @paths ;
|
||||
# Remove empty elements. Sort forced all blank names to the front.
|
||||
while ( not length @paths[0] ) {
|
||||
while ( scalar @paths and not length @paths[0] ) {
|
||||
shift @paths ;
|
||||
}
|
||||
@paths = map { (-e $_) ? abs_path($_) : $_ } @paths ;
|
||||
|
Loading…
Reference in New Issue
Block a user