From 5a34a3a3ece5eb6a445ec0b0682221734b3e3ab0 Mon Sep 17 00:00:00 2001 From: notting Date: Feb 26 2000 02:42:58 +0000 Subject: mblen is returning 0 on sparc. Dunno why, but this at least lets the installer run... --- diff --git a/newt.spec b/newt.spec index ed37cb6..1105fec 100644 --- 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 +* Fri Feb 25 2000 Bill Nottingham +- fix doReflow to handle mblen returning 0 + +* Wed Feb 23 2000 Preston Brown - fix critical bug in fkey 1-4 recognition on xterms * Wed Feb 9 2000 Matt Wilson diff --git a/textbox.c b/textbox.c index 11ace20..3545054 100644 --- 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;