]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
- modified length of password string to match visible field length
authorDan Lynch <danjlynch@users.sourceforge.net>
Wed, 28 Jun 2006 11:52:30 +0000 (11:52 +0000)
committerDan Lynch <danjlynch@users.sourceforge.net>
Wed, 28 Jun 2006 11:52:30 +0000 (11:52 +0000)
- value of n passed to wgetnstr should now be equivalent to output from strlen (i.e. length excluding NUL-terminating character)

src/util/mucurses_test.c

index 85c9a3b731c390c5450d0d904d2120f416a9d4b5..586562df5de6aaa7259581412b398faca0e1546e 100644 (file)
@@ -25,7 +25,7 @@ int main ( void ) {
 void get_iscsi_chap_secret( char *sec ) {
        char    *title = "Set new iSCSI CHAP secret",
                *msg = "Configure the iSCSI access secret",
-               pw1[16], pw2[16];
+               pw1[17], pw2[17];
        WINDOW *secret;
 
        secret = newwin( stdscr->height / 2,
@@ -44,9 +44,9 @@ void get_iscsi_chap_secret( char *sec ) {
        mvwhline( secret, 8, 12, '_' | secret->attrs, 16 );
 
        wmove( secret, 6, 12 );
-       wgetnstr( secret, pw1, 12 );
+       wgetnstr( secret, pw1, 16 );
        wmove( secret, 8, 12 );
-       wgetnstr( secret, pw2, 12 );
+       wgetnstr( secret, pw2, 16 );
 
        if ( strcmp( pw1, pw2 ) == 0 ) {
                strcpy( sec, pw1 );