Skip to content

Commit 88180ad

Browse files
committed
gamestate: Do not substr on double wildcard.
1 parent bd17e3a commit 88180ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libopenage/gamestate/game.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ void Game::load_data(const std::shared_ptr<assets::ModManager> &mod_manager) {
6767
recursive = true;
6868
if (parts.size() == 1) {
6969
// include = "**"
70-
search = include.substr(0, include.size() - 2);
70+
// start in root directory
71+
search = "";
7172
}
7273
else {
7374
// include = "path/to/somewhere/**"
74-
// remove the slash '/' too
75+
// remove the wildcard '**' and the slash '/'
7576
search = include.substr(0, include.size() - 3);
7677
}
7778
}

0 commit comments

Comments
 (0)