Skip to content

get_tty_password(Windows) - CreateFile error #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libmariadb/get_password.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ char* get_tty_password(char *prompt, char *buffer, int length)
if (prompt)
fprintf(stderr, "%s", prompt);

if (!(Hdl= CreateFile("CONIN$",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING, 0, NULL)))
if ((Hdl= CreateFile("CONIN$",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
{
/* todo: provide a graphical dialog */
return buffer;
Expand Down