summaryrefslogtreecommitdiff
path: root/Games/Snake
diff options
context:
space:
mode:
authorBrendan Coles <bcoles@gmail.com>2020-11-04 11:49:50 +0000
committerAndreas Kling <kling@serenityos.org>2020-11-04 19:36:27 +0100
commite558f6b184e6a8d2a42814726c500d8103022236 (patch)
tree63ae0ced6b2017a94f56efccf7c9f6cdcd05a7ff /Games/Snake
parent0603402c80cce7e5e39d6d9d56a943c1cfaf7b79 (diff)
downloadserenity-e558f6b184e6a8d2a42814726c500d8103022236.zip
Minesweeper+Snake: load config file before calling unveil()
Diffstat (limited to 'Games/Snake')
-rw-r--r--Games/Snake/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Games/Snake/main.cpp b/Games/Snake/main.cpp
index f59818af4a..82437dfc42 100644
--- a/Games/Snake/main.cpp
+++ b/Games/Snake/main.cpp
@@ -51,13 +51,13 @@ int main(int argc, char** argv)
return 1;
}
+ auto config = Core::ConfigFile::get_for_app("Snake");
+
if (unveil("/res", "r") < 0) {
perror("unveil");
return 1;
}
- auto config = Core::ConfigFile::get_for_app("Snake");
-
if (unveil(config->file_name().characters(), "crw") < 0) {
perror("unveil");
return 1;