Skip to content

Commit

Permalink
Merge pull request #119 from facelessuser/bugfix/step-loop
Browse files Browse the repository at this point in the history
Fix for long running step loop
  • Loading branch information
facelessuser authored Feb 19, 2022
2 parents 59ffef1 + 8dad0dd commit ccdd424
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coloraide/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,5 @@ def parse_version(ver: str) -> Version:
return Version(major, minor, micro, release, pre, post, dev)


__version_info__ = Version(0, 9, 0, "final")
__version_info__ = Version(0, 10, 0, "final")
__version__ = __version_info__._get_canonical()
3 changes: 1 addition & 2 deletions coloraide/interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,7 @@ def color_steps(

# If we currently have delta over our limit inject more stops.
# If inserting between every color would push us over the max_steps, halt.
count = len(ret)
while m_delta > max_delta_e and (count * 2 - 1 <= max_steps):
while m_delta > max_delta_e and (len(ret) * 2 - 1 <= max_steps):
# Inject stops while measuring again to see if it was sufficient
m_delta = 0.0
i = 1
Expand Down
5 changes: 5 additions & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.10.0

- **FIX**: Fix an issue where when attempting to generate steps some ∆E distance apart, the maximum step range was not
respected and could result in large hangs.

## 0.9.0

!!! warning "Breaking Change"
Expand Down

0 comments on commit ccdd424

Please sign in to comment.