app_init :: proc(storage_path: string) -> App {
screen := nc.initscr()
+ nc.noecho()
nc.cbreak()
nc.curs_set(0)
net.close(app.host)
profile_deinit(app.profile)
- delete(app.profile_password)
+
+ if len(app.profile_password) != 0 {
+ delete(app.profile_password)
+ }
+
config_deinit(app.config)
nc.delwin(app.input_window)
config_update(app.config, app)
- app_set_state(app, .Ask_Profile_Password)
+ app_set_state(app, .Load_Profile)
}
state_ask_profile_password :: proc(app: ^App) {
},
)
- app.profile_password = app_get_input(app, true)
+ if len(app.profile_password) != 0 {
+ delete(app.profile_password)
+ }
+
+ app.profile_password = app_get_input(app, true, true)
app_set_state(app, .Load_Profile)
}