From 4daad87ea269dc142d52359ff73634aa96bc9778 Mon Sep 17 00:00:00 2001 From: Rodrigo Queiro Date: Wed, 25 Sep 2019 15:29:32 +0200 Subject: [PATCH] Fix segfault in beast_test Bazel wasn't providing argv[3] which causes a segfault on Windows. --- test/beast_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/beast_test.cc b/test/beast_test.cc index 42a2b5903..0f68edbaa 100644 --- a/test/beast_test.cc +++ b/test/beast_test.cc @@ -21,7 +21,7 @@ int main(int argc, char** argv) auto const host = "example.com"; auto const port = "80"; - auto const target = argv[3]; + auto const target = argc > 3 ? argv[3] : "/"; int version = argc == 5 && !std::strcmp("1.0", argv[4]) ? 10 : 11; // The io_context is required for all I/O