2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00

Check $(version[1]) before using it in [ numbers.less ] (#509)

This commit is contained in:
Peter Dimov
2019-11-21 17:04:23 -08:00
committed by Rene Rivera
parent 9ac7d67758
commit d855b77a80

View File

@@ -974,13 +974,13 @@ local rule toolset-tag ( name : type ? : property-set )
}
# From GCC 5, versioning changes and minor becomes patch
if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
if $(tag) = gcc && $(version[1]) && [ numbers.less 4 $(version[1]) ]
{
version = $(version[1]) ;
}
# Ditto, from Clang 4
if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
if ( $(tag) = clang || $(tag) = clangw ) && $(version[1]) && [ numbers.less 3 $(version[1]) ]
{
version = $(version[1]) ;
}