Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for crashing range indexes when variable length is 1 #306

Merged
merged 5 commits into from
Apr 10, 2021

Conversation

lkuczborski
Copy link
Contributor

This PR fixes a crash when variable length equals 1 - one single quote (') or one double quote("):
Fatal error: Can't form Range with upperBound < lowerBound: file Swift/x86_64-apple-macos.swiftinterface, line 14814

Copy link
Contributor

@djbe djbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

Besides the small tweak, please add a changelog entry in the same format as the other entries 🙏 (easiest is to copy an existing entry, the spaces are important for formatting)

Sources/Variable.swift Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@krzysztofzablocki
Copy link
Contributor

great, this fixes a crash that occurs in the middle of template writing in Sourcery

@krzysztofzablocki
Copy link
Contributor

@djbe good to merge? I'll need to grab this for next Sourcery Pro release

@djbe djbe merged commit 88fd776 into stencilproject:master Apr 10, 2021
@djbe djbe added this to the 0.14.1 milestone Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants