diff --git a/src/Ic.cxx b/src/Ic.cxx index 09ef956..81f26db 100644 --- a/src/Ic.cxx +++ b/src/Ic.cxx @@ -170,7 +170,7 @@ std::vector> Ic::executeSequence(std::vector< Data data = it.second; try { if (operation == Operation::Read) { - auto out = read(boost::get(data)); + auto out = read(boost::get(data)); ret.push_back({ operation, out }); } else if (operation == Operation::Write) { write(boost::get(data)); @@ -204,8 +204,10 @@ std::string Ic::writeSequence(std::vector> ops, bool for (const auto& it : out) { Operation operation = it.first; Data data = it.second; - if (operation == Operation::Read || operation == Operation::Write) { + if (operation == Operation::Read) { resultBuffer << Util::formatValue(boost::get(data)) << "\n"; + } else if (operation == Operation::Write) { + resultBuffer << Util::formatValue(boost::get(data).data) << "\n"; } else if (operation == Operation::Error) { std::string errMessage = boost::get(data); resultBuffer << errMessage;