From e5a4dc6a96d740d9c8fd491760d90d3bbb4f5184 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sat, 22 Jul 2017 06:31:22 -0700 Subject: [PATCH] Tidy up test warning --- CHANGELOG.md | 1 + test/websocket/stream.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d22b598..8ca50347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Version 85: * Fix test failure +* Tidy up test warning -------------------------------------------------------------------------------- diff --git a/test/websocket/stream.cpp b/test/websocket/stream.cpp index fb617aeb..878a38a9 100644 --- a/test/websocket/stream.cpp +++ b/test/websocket/stream.cpp @@ -981,14 +981,14 @@ public: auto const check = [&](error_code const& ev, std::string const& s) { - for(std::size_t i = 0; i < s.size(); ++i) + for(std::size_t i = 1; i < s.size(); ++i) { stream ws(ios_, s.substr(i, s.size() - i)); try { - ws.accept(boost::asio::buffer( - s.substr(0, i), i)); + ws.accept( + boost::asio::buffer(s.data(), i)); BEAST_EXPECTS(! ev, ev.message()); } catch(system_error const& se)