Skip to content
Snippets Groups Projects
Commit 47e56f23 authored by Kaldoran's avatar Kaldoran
Browse files

Change ascii value to std::isprint() function

parent 71b6998e
Branches
Tags
No related merge requests found
......@@ -90,7 +90,7 @@ struct LogMethod {
void logPrintable(const uint8_t *buf, size_t buflen) const {
std::string buf_clean(buflen, '\0');
for (size_t i=0; i<buflen; i++)
buf_clean[i] = buf[i] >= 32 && buf[i] <= 126 ? buf[i] : '.';
buf_clean[i] = std::isprint(buf[i]) ? buf[i] : '.';
(*this)("%s", buf_clean.c_str());
}
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment