Browse Source

fix initial array index value

CPP-GTK4
yggverse 2 weeks ago
parent
commit
38b2ac4f04
  1. 2
      src/app/browser/main/tab/page/navbar/history.cpp
  2. 2
      src/app/browser/main/tab/page/navbar/history.hpp

2
src/app/browser/main/tab/page/navbar/history.cpp

@ -40,7 +40,7 @@ void History::add(
if (FOLLOW) if (FOLLOW)
{ {
index = memory.size(); // @TODO not last index, use iterator index = memory.size() - 1;
} }
} }

2
src/app/browser/main/tab/page/navbar/history.hpp

@ -22,7 +22,7 @@ namespace app::browser::main::tab::page::navbar
history::Back * historyBack; history::Back * historyBack;
history::Forward * historyForward; history::Forward * historyForward;
int index = 0; int index = -1;
public: public:

Loading…
Cancel
Save