Fix #7355 - json indent with color glitch

This commit is contained in:
pancake 2017-04-26 11:21:52 +02:00
parent 264368f12e
commit 5270b781e7
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,6 @@
//HANDLE
#elif HAVE_PTHREAD
#define __USE_UNIX98
#define __GNU
#include <pthread.h>
#define R_TH_TID pthread_t

View File

@ -123,6 +123,10 @@ R_API char* r_print_json_indent(const char* s, bool color, const char* tab) {
break;
case '}':
case ']':
*o++ = 0x1b;
*o++ = '[';
*o++ = '0';
*o++ = 'm';
isValue = false;
*o++ = '\n';
indent--;
@ -137,4 +141,3 @@ R_API char* r_print_json_indent(const char* s, bool color, const char* tab) {
*o = 0;
return O;
}