From c55311aa6d40db5f322d2f8762b5bce03a06a12e Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Wed, 22 Apr 2009 20:46:49 +0000 Subject: [PATCH] * src/login.c: After login_prompt(), do not check for unset username, but for empty username. --- ChangeLog | 5 +++++ src/login.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 112cbe43..eabbe517 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-22 Nicolas François + + * src/login.c: After login_prompt(), do not check for unset + username, but for empty username. + 2009-04-22 Nicolas François * lib/defines.h: Define USER_NAME_MAX_LENGTH, based on utmp and diff --git a/src/login.c b/src/login.c index 1fc69a07..cb08db0f 100644 --- a/src/login.c +++ b/src/login.c @@ -925,7 +925,7 @@ int main (int argc, char **argv) username[USER_NAME_MAX_LENGTH] = '\0'; login_prompt (_("\n%s login: "), username, USER_NAME_MAX_LENGTH); - if ('\0' == username) { + if ('\0' == username[0]) { /* Prompt for a new login */ free (username); username = NULL;