Skip to content

Commit

Permalink
Fix new mail flag + optional recursive calls
Browse files Browse the repository at this point in the history
  • Loading branch information
gahr committed Aug 7, 2020
1 parent 1fe0801 commit fb15ae3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions status.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
snprintf(buf, buflen, fmt, num);
}
else if (num)
else if (num == 0)
optional = false;
break;
}
Expand Down Expand Up @@ -396,12 +396,12 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c
if (optional)
{
mutt_expando_format(buf, buflen, col, cols, if_str, status_format_str,
(intptr_t) menu, MUTT_FORMAT_NO_FLAGS);
(intptr_t) data, MUTT_FORMAT_NO_FLAGS);
}
else if (flags & MUTT_FORMAT_OPTIONAL)
{
mutt_expando_format(buf, buflen, col, cols, else_str, status_format_str,
(intptr_t) menu, MUTT_FORMAT_NO_FLAGS);
(intptr_t) data, MUTT_FORMAT_NO_FLAGS);
}

return src;
Expand Down

0 comments on commit fb15ae3

Please sign in to comment.