dialog: fix "no blanks" issue w/ BE targets
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
parent
f6ab65d963
commit
49a764352c
|
@ -0,0 +1,21 @@
|
|||
Source: @pullmoll
|
||||
Upstream: no (should be queried)
|
||||
Reason: fix issue with dialog dropping blanks (BE targets)
|
||||
|
||||
The conversion of isblank() to int is vague thus use constants.
|
||||
Pre decrement the dst ptr and test for it being greater than base.
|
||||
|
||||
--- util.c 2018-06-22 01:47:10.000000000 +0200
|
||||
+++ util.c 2019-05-30 10:35:00.517648968 +0200
|
||||
@@ -2330,9 +2330,9 @@
|
||||
static bool
|
||||
trim_blank(char *base, char *dst)
|
||||
{
|
||||
- int count = isblank(UCH(*dst));
|
||||
+ int count = isblank(UCH(*dst)) ? 1 : 0;
|
||||
|
||||
- while (dst-- != base) {
|
||||
+ while (--dst > base) {
|
||||
if (*dst == '\n') {
|
||||
break;
|
||||
} else if (isblank(UCH(*dst))) {
|
|
@ -3,7 +3,7 @@ pkgname=dialog
|
|||
_distver=1.3
|
||||
_date=20190211
|
||||
version="${_distver}.${_date}"
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="${pkgname}-${_distver}-${_date}"
|
||||
build_style=gnu-configure
|
||||
configure_args="--with-ncursesw --disable-nls"
|
||||
|
|
Loading…
Reference in New Issue