Ticket #1213: 0001-Fix-player-name-initialization.patch

File 0001-Fix-player-name-initialization.patch, 517 bytes (added by ycombinator, 9 years ago)
  • src/main.c

    Signed-off-by: Rooslan S. Khayrov <khayrov@gmail.com>
    ---
     src/main.c |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/src/main.c b/src/main.c
    index f9787ea..7bb2ec1 100644
    a b int main(int argc, char *argv[]) 
    427427#ifdef SET_UID 
    428428 
    429429        /* Get the "user name" as a default player name, unless set with -u switch */ 
    430         if(!op_ptr->full_name) 
     430        if(!op_ptr->full_name[0]) 
    431431        { 
    432432                user_name(op_ptr->full_name, sizeof(op_ptr->full_name), player_uid); 
    433433        }