diff --git a/src/underground_worker.cpp b/src/underground_worker.cpp index 2fd6451..656c19f 100644 --- a/src/underground_worker.cpp +++ b/src/underground_worker.cpp @@ -110,8 +110,11 @@ nlohmann::json UndergroundWorker::spyIn(int performerId,int victimId,const json& } std::string status = "pending"; if(result.is_object()){ - if(auto s = result.find("status"); s!=result.end() && s->is_string()) status = *s; - else status = "done"; + if(auto s = result.find("status"); s!=result.end() && s->is_string()) { + status = s->get(); + } else { + status = "done"; + } } activities.push_back({ {"id", std::stoi(r.at("id"))},