mirror of
https://github.com/mirror/wget.git
synced 2025-03-10 01:30:16 +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
|
#else
|
||||||
static int count_cols (const char *mbs) { return (int) strlen(mbs); }
|
static int count_cols (const char *mbs) { return (int) strlen(mbs); }
|
||||||
static int
|
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;
|
int len = strlen(mbs);
|
||||||
return cols;
|
int ret = len < cols ? len : cols;
|
||||||
|
*ncols = ret;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user