[Commits] [wesnoth/wesnoth] bb6baf: Fixed bug where entering Preferences would clear s...

GitHub noreply at github.com
Fri Sep 16 16:50:00 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: bb6baf8a78f7a58a09205ed13e2bd7de687e4ece
      https://github.com/wesnoth/wesnoth/commit/bb6baf8a78f7a58a09205ed13e2bd7de687e4ece
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2016-09-17 (Sat, 17 Sep 2016)

  Changed paths:
    M src/game_preferences.cpp

  Log Message:
  -----------
  Fixed bug where entering Preferences would clear saved password

After refactoring Prefs to use dialog fields, set_remember_password was called every time the dialog
closed. prv::password wasn't initialized at that point, meaning the password was always set to "".
This fixes the bug by explicitly clearing it if false is passed instead of setting it every time.

Previous iterations of the Prefs dialog only called the options setters when they were selected, meaning
this never came up as an issue. Toggling the option off would clear the saved password, and toggling it on
would leave it empty until it was re-entered.





More information about the Commits mailing list