Skip to content

Fix width out-of-bounds issues#99

Open
tony-osibov wants to merge 1 commit intoaegirhall:developfrom
tony-osibov:develop
Open

Fix width out-of-bounds issues#99
tony-osibov wants to merge 1 commit intoaegirhall:developfrom
tony-osibov:develop

Conversation

@tony-osibov
Copy link

In _format_content there is the possibility that the width value evaluates to a negative value which will throw a ValueError: Sign not allowed in string format specifier. Adding a minimum 0 value ensures that only positive values are used during string formatting.

In calculate_content_width the returned value can result in a value less than 1 which causes issues. Ensuring a value of 1 or greater solves this.

There is the possibility that the width value evaluates to a negative value which will throw a ValueError: Sign not allowed in string format specifier. Adding a minimum 0 value ensures that only positive values are used during string formatting.

Fix less than 1 calculated width bug

Using a value less than 1 throws and error so make sure that isn't possible
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.

1 participant