]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
mblen is returning 0 on sparc. Dunno why, but this at least lets the installer run... r0-50-1
authornotting <notting>
Sat, 26 Feb 2000 02:42:58 +0000 (02:42 +0000)
committernotting <notting>
Sat, 26 Feb 2000 02:42:58 +0000 (02:42 +0000)
newt.spec
textbox.c

index ed37cb6c9f7347f0e6db3016f930af5e43854cc9..1105fec8e549f537160520d3637c00d204c56540 100644 (file)
--- a/newt.spec
+++ b/newt.spec
@@ -2,7 +2,7 @@ Summary: A development library for text mode user interfaces.
 Name: newt
 %define version 0.50.8
 Version: %{version}
-Release: 1
+Release: 2
 Copyright: LGPL
 Group: System Environment/Libraries
 Source: ftp://ftp.redhat.com/pub/redhat/code/newt/newt-%{version}.tar.gz
@@ -55,7 +55,10 @@ rm -rf $RPM_BUILD_ROOT
 %postun -p /sbin/ldconfig
 
 %changelog
-* Wed Feb 22 2000 Preston Brown <pbrown@redhat.com>
+* Fri Feb 25 2000 Bill Nottingham <notting@redhat.com>
+- fix doReflow to handle mblen returning 0
+
+* Wed Feb 23 2000 Preston Brown <pbrown@redhat.com>
 - fix critical bug in fkey 1-4 recognition on xterms
 
 * Wed Feb  9 2000 Matt Wilson <msw@redhat.com>
index 11ace205e47bb74a15b83426b075fa847841871a..35450540fb16adc31309f00bdf98e3c20bcd7b6c 100644 (file)
--- a/textbox.c
+++ b/textbox.c
@@ -185,7 +185,7 @@ static void doReflow(const char * text, char ** resultPtr, int width,
               len = 0;
               do {
                  cl = mblen(chptr, MB_CUR_MAX * 4);
-                 if (cl == -1)
+                 if (cl <= 0)
                    cl = 1;
                  len += cl;
                  chptr += cl;