fix connection dialog cancel behavior

This commit is contained in:
cy384 2020-09-14 20:01:19 -04:00
parent 1e4754c66a
commit 560e77cccb
1 changed files with 3 additions and 3 deletions

View File

@ -647,15 +647,15 @@ int intro_dialog(char* hostname, char* username, char* password)
GetDialogItemText((Handle)port_text_box, (unsigned char *)hostname+hostname[0]+1); GetDialogItemText((Handle)port_text_box, (unsigned char *)hostname+hostname[0]+1);
hostname[hostname[0]+1] = ':'; hostname[hostname[0]+1] = ':';
// if we hit cancel, 0
if (item == 8) return 0;
int use_password = GetControlValue(password_radio); int use_password = GetControlValue(password_radio);
// clean it up // clean it up
DisposeDialog(dlg); DisposeDialog(dlg);
FlushEvents(everyEvent, -1); FlushEvents(everyEvent, -1);
// if we hit cancel, 0
if (item == 8) return 0;
if (use_password) if (use_password)
{ {
return password_dialog(); return password_dialog();