Skip to content
Snippets Groups Projects
Verified Commit 86965ead authored by Pavel Doležal's avatar Pavel Doležal
Browse files

Writer: Fix potential bug with comparing signed and unsigned integers

parent 5bbcc762
No related branches found
No related tags found
1 merge request!29Add Python bindings generated by pybind11
......@@ -227,7 +227,7 @@ namespace CDNS {
*/
void write(const char* p, std::size_t size) override {
int ret = ::write(m_value, p, size);
if (ret != size) {
if (ret != static_cast<int>(size)) {
throw CborOutputException("Given " + std::to_string(size) + " bytes to write, but "
"only " + std::to_string(ret) + " bytes were written!");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment