From b0ba4b01a4fee3409768bdced4de6719b51297bc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 13 Dec 2012 20:52:09 +0100 Subject: COMMON: Add wrapper for isprint. This is done in the spirit of 658080deeda79d20ea40643569fbcb072573e7cf. --- common/str.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/str.cpp') diff --git a/common/str.cpp b/common/str.cpp index 84805082ac..8210ca6bb8 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -764,7 +764,7 @@ String tag2string(uint32 tag) { str[4] = '\0'; // Replace non-printable chars by dot for (int i = 0; i < 4; ++i) { - if (!isprint((unsigned char)str[i])) + if (!Common::isPrint(str[i])) str[i] = '.'; } return String(str); -- cgit v1.2.3 From b4d0a8ba66e2c99949d1fa14d801c7de77db76ba Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 26 Jan 2013 19:33:27 +0100 Subject: JANITORIAL: Enforce "} // End of namespace" with a single space after }. --- common/str.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/str.cpp') diff --git a/common/str.cpp b/common/str.cpp index 8210ca6bb8..61fdcfaf31 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -850,7 +850,7 @@ size_t strlcat(char *dst, const char *src, size_t size) { return dstLength + (src - srcStart); } -} // End of namespace Common +} // End of namespace Common // Portable implementation of stricmp / strcasecmp / strcmpi. // TODO: Rename this to Common::strcasecmp -- cgit v1.2.3 From 33a29ca61ce6c8d653017b61bfae33b4da71dc01 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 20 Mar 2013 20:10:13 +0000 Subject: COMMON: Fix assert condition in String::setChar() --- common/str.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/str.cpp') diff --git a/common/str.cpp b/common/str.cpp index 61fdcfaf31..5d647ee4f0 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -370,7 +370,7 @@ void String::clear() { } void String::setChar(char c, uint32 p) { - assert(p <= _size); + assert(p < _size); makeUnique(); _str[p] = c; -- cgit v1.2.3