diff --git a/yoga/algorithm/CalculateLayout.cpp b/yoga/algorithm/CalculateLayout.cpp index ec35ddf8..cf86262e 100644 --- a/yoga/algorithm/CalculateLayout.cpp +++ b/yoga/algorithm/CalculateLayout.cpp @@ -1260,7 +1260,7 @@ static void justifyMainAxis( case Justify::SpaceBetween: if (flexLine.itemsInFlow.size() > 1) { betweenMainDim += - yoga::maxOrDefined(flexLine.layout.remainingFreeSpace, 0) / + yoga::maxOrDefined(flexLine.layout.remainingFreeSpace, 0.0f) / static_cast(flexLine.itemsInFlow.size() - 1); } break;