mirror of
https://github.com/mirror/wget.git
synced 2025-03-09 09:10:17 +08:00
* src/progress.c (count_cols): Fix return value if USE_NLS_PROGRESS_BAR is undefined
Taking patch from #54126 Reported-by: Vyacheslav Copyright-paperwork-exempt: Yes
This commit is contained in:
parent
ce8ce5bfc0
commit
042f2727bf
@ -861,10 +861,12 @@ cols_to_bytes (const char *mbs, const int cols, int *ncols)
|
||||
#else
|
||||
static int count_cols (const char *mbs) { return (int) strlen(mbs); }
|
||||
static int
|
||||
cols_to_bytes (const char *mbs _GL_UNUSED, const int cols, int *ncols)
|
||||
cols_to_bytes (const char *mbs, const int cols, int *ncols)
|
||||
{
|
||||
*ncols = cols;
|
||||
return cols;
|
||||
int len = strlen(mbs);
|
||||
int ret = len < cols ? len : cols;
|
||||
*ncols = ret;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user