Skip to content

Commit

Permalink
Fix case where mergeComplexNumberFormatMasks would get stuck in endle…
Browse files Browse the repository at this point in the history
…ss-loop if $numbers had many decimals
  • Loading branch information
brainz80 committed Jan 14, 2021
1 parent ec51b75 commit af6afb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Style/NumberFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ private static function mergeComplexNumberFormatMasks($numbers, $masks)
$postDecimalMasks = [];

do {
$tempMask = array_pop($masks);
if (($tempMask = array_pop($masks)) === null) break;
$postDecimalMasks[] = $tempMask;
$decimalCount -= strlen($tempMask);
} while ($decimalCount > 0);
Expand Down

0 comments on commit af6afb0

Please sign in to comment.