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

expando: padding default to space #4277

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

expando: padding default to space #4277

wants to merge 3 commits into from

Conversation

flatcap
Copy link
Member

@flatcap flatcap commented Apr 26, 2024

If we can't parse the padding character, default to space for now.

This may fix #4270

If a format string ended in %> (hard padding), but it omitted the padding character,
then NeoMutt would get stuck in a loop trying to pad out a string with "" (nothing).

@flatcap flatcap added the type:bug Bug label Apr 26, 2024
@flatcap flatcap self-assigned this Apr 26, 2024
@flatcap flatcap requested a review from a team as a code owner April 26, 2024 08:21
@bmclean2
Copy link

@flatcap I have tried the %> (without the space) on debb1b1 and can confirm that it works now.

@flatcap
Copy link
Member Author

flatcap commented Apr 26, 2024

Brilliant, thanks!

Now that I know what the problem was, I'll rework this PR (soon-ish) to display an error message.
That'll allow me to add some tests too.

{
case 'y':
tm.tm_year -= priv->count;
tm.tm_year -= count;

Check warning

Code scanning / CodeQL

Year field changed using an arithmetic operation without checking for leap year Warning

Field
tm_year
on variable
tm
has been modified, but no appropriate check for LeapYear was found.
@flatcap flatcap force-pushed the devel/padding branch 3 times, most recently from ba081eb to 109ade5 Compare May 6, 2024 12:22
If we can't parse the padding character, default to space for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest release hangs on startup (macOS 12.7.4)
2 participants