What do you mean? My fix does not do that. My fix consists in just take the "main" number of the product version. For instance, if you do:
sw_vers -productVersion
You obtain a product version having the format of three number having a dot as a separator, e.g., 13.0.1
The line that give me the error was wrong because it would have work for a floating point number, i.e., two numbers separated by a dot, e.g., 13.0, to reduce it in an integer by just taking its integer part through %.0f and obtain, for example, 13.
This is exactly what my fix does through awk. It takes the first one of the three numbers separated by the dot, i.e., 13, which is an integer so that %d is enough.