diff --git a/v3/src/AsyncGetAction.cpp b/v3/src/AsyncGetAction.cpp index 16d0508..30fd2d3 100644 --- a/v3/src/AsyncGetAction.cpp +++ b/v3/src/AsyncGetAction.cpp @@ -7,9 +7,9 @@ etcdv3::AsyncGetAction::AsyncGetAction(std::string const & key, KV::Stub* stub_, { RangeRequest get_request; get_request.set_key(key); + prefix = withPrefix; if(withPrefix) { - prefix = withPrefix; std::string range_end(key); int ascii = (int)range_end[range_end.length()-1]; range_end.back() = ascii+1; @@ -38,6 +38,6 @@ etcdv3::AsyncRangeResponse etcdv3::AsyncGetAction::ParseResponse() range_resp.action = etcdv3::GET_ACTION; range_resp.isPrefix = prefix; } - + return range_resp; }