summaryrefslogtreecommitdiffstats
path: root/src/util/mucurses_test.c
diff options
context:
space:
mode:
authorDan Lynch2006-06-28 13:52:30 +0200
committerDan Lynch2006-06-28 13:52:30 +0200
commitba2bfd54ed04463f72c624243da6f70982b89165 (patch)
tree90131b9815916ffa35ba515e032cc3b2bc2695c3 /src/util/mucurses_test.c
parentstarted on ANSI sequence processing (diff)
downloadipxe-ba2bfd54ed04463f72c624243da6f70982b89165.tar.gz
ipxe-ba2bfd54ed04463f72c624243da6f70982b89165.tar.xz
ipxe-ba2bfd54ed04463f72c624243da6f70982b89165.zip
- modified length of password string to match visible field length
- value of n passed to wgetnstr should now be equivalent to output from strlen (i.e. length excluding NUL-terminating character)
Diffstat (limited to 'src/util/mucurses_test.c')
-rw-r--r--src/util/mucurses_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/mucurses_test.c b/src/util/mucurses_test.c
index 85c9a3b7..586562df 100644
--- a/src/util/mucurses_test.c
+++ b/src/util/mucurses_test.c
@@ -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 );