Skip to content

Commit 9851bce

Browse files
committed
Fixed problem when char is unsigned (ARM/Android).
Bumped version.
1 parent aa82111 commit 9851bce

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.05...3.30 FATAL_ERROR)
22

3-
set (LOGFAULT_VERSION 0.8.0)
3+
set (LOGFAULT_VERSION 0.8.1)
44

55
project(logfault
66
DESCRIPTION "Simple to use, header only C++ library for application-logging on all major platforms."

include/logfault/logfault.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ class fast_streambuf : public std::streambuf {
528528
void JsonEscape(const T& msg, std::ostream& out) {
529529
static constexpr std::array<char, 16> hex = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
530530
static constexpr std::array<char, 93> table = {
531-
-1, -1, -1, -1, -1, -1, -1, -1, 'b', 't', 'n', -1, 'f', 'r', -1, -1, -1
532-
, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0
531+
1, 1, 1, 1, 1, 1, 1, 1, 'b', 't', 'n', 1, 'f', 'r', 1, 1, 1
532+
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
533533
, 0, '"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
534534
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
535535
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -593,7 +593,7 @@ class fast_streambuf : public std::streambuf {
593593
putc_buffer(*p);
594594
continue;
595595
}
596-
if (tc > 0) {
596+
if (tc != 1) {
597597
putc_buffer('\\');
598598
putc_buffer(tc);
599599
continue;

0 commit comments

Comments
 (0)