Use the correct upper bound for restoring the font collector modes

This commit is contained in:
Thomas Goyne 2015-11-01 20:12:29 -08:00
parent e8cdfc57a9
commit f481a7f5fb

View file

@ -231,7 +231,7 @@ DialogFontsCollector::DialogFontsCollector(agi::Context *c)
#endif #endif
}; };
collection_mode = new wxRadioBox(this, -1, _("Action"), wxDefaultPosition, wxDefaultSize, countof(modes), modes, 1); collection_mode = new wxRadioBox(this, -1, _("Action"), wxDefaultPosition, wxDefaultSize, countof(modes), modes, 1);
collection_mode->SetSelection(mid<int>(0, OPT_GET("Tool/Fonts Collector/Action")->GetInt(), 4)); collection_mode->SetSelection(mid<int>(0, OPT_GET("Tool/Fonts Collector/Action")->GetInt(), countof(modes)));
if (c->path->Decode("?script") == "?script") if (c->path->Decode("?script") == "?script")
collection_mode->Enable(2, false); collection_mode->Enable(2, false);