Skip to content

Commit

Permalink
Fix off-by-one error when loading power menu upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
dorkster committed Aug 23, 2018
1 parent 5a0f28e commit a61426c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MenuPowers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void MenuPowers::loadPowerTree(const std::string &filename) {
// fill cell groups with upgrades
for (size_t i = 0; i < power_cell.size(); ++i) {
for (size_t j = 1; j < power_cell[i].cells.size(); ++j) {
for (size_t k = 1; k < power_cell_upgrade.size(); ++k) {
for (size_t k = 0; k < power_cell_upgrade.size(); ++k) {
if (power_cell_upgrade[k].id == power_cell[i].cells[j].id) {
power_cell[i].cells[j] = power_cell_upgrade[k];
power_cell[i].cells[j].upgrade_level = static_cast<int>(j) + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ FLARE. If not, see https://www.gnu.org/licenses/

#include <SDL.h>

Version VersionInfo::ENGINE(1, 6, 39);
Version VersionInfo::ENGINE(1, 6, 40);
Version VersionInfo::MIN(0, 0, 0);
Version VersionInfo::MAX(USHRT_MAX, USHRT_MAX, USHRT_MAX);

Expand Down

0 comments on commit a61426c

Please sign in to comment.