[prev in list] [next in list] [prev in thread] [next in thread] 

List:       util-linux-ng
Subject:    Re: cfdisk: get_string not calculating correct limits with wide ncurses
From:       Mike Frysinger <vapier () gentoo ! org>
Date:       2010-07-19 21:50:11
Message-ID: 201007191750.12937.vapier () gentoo ! org
[Download RAW message or body]

On Monday, July 19, 2010 17:20:31 Karel Zak wrote:
> On Mon, Jul 19, 2010 at 03:15:04PM -0400, Mike Frysinger wrote:
> > if you load up cfdisk and then try to change the partition type, the
> > input field only allows for inputting 1 character instead of the
> > required 2. building against narrow ncurses gives correct behavior.
> > 
> > to reproduce:
> > 	- build util-linux against wide ncurses
> > 	- run cfdisk on a partitioned disk
> > 	- select an existing partition
> > 	- select Type
> > 	- notice that you can only input 1 char
> > 
> > seems like the calculation in get_string() wrt the incoming limit is
> > slightly off, but i'm not familiar enough with this code to propose a
> > correct patch.
> 
>  There was N+1 bug. The original non-wide get_string() function didn't
>  count \0. The "Enter filesystem type:" dialog depended on this broken
>  behavior.
> 
>  The new wide-char code counts also \0, so the bug in the dialog was
>  visible with wide-char support.

thanks, this change seems to work for me
-mike

["signature.asc" (application/pgp-signature)]
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic