From f707519a52c8c71cb3a0ccf41318a392e0d7d435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20Minh=20Tu=E1=BA=A5n?= Date: Sun, 3 Mar 2019 18:10:18 +0700 Subject: [PATCH] normalize in issue mode (#1414) * normalize tab character in cs * normalize in issue mode --- suite/cstest/src/capstone_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/suite/cstest/src/capstone_test.c b/suite/cstest/src/capstone_test.c index 46a5cf5961..c09ecccc51 100644 --- a/suite/cstest/src/capstone_test.c +++ b/suite/cstest/src/capstone_test.c @@ -281,7 +281,7 @@ void test_single_issue(csh *handle, cs_mode mode, char *line, int detail) int i, count, j; unsigned char *code; cs_insn *insn; - char *cs_result, *tmp; + char *cs_result, *tmp, *p; char **offset_opcode; int size_offset_opcode; unsigned long offset; @@ -333,6 +333,7 @@ void test_single_issue(csh *handle, cs_mode mode, char *line, int detail) trim_str(cs_result); add_str(&cs_result, " ;"); // list_part_cs_result = split(cs_result, " ; ", &size_part_cs_result); + for (p = list_part[1]; *p; ++p) if (*p == '\t') *p = ' '; list_part_issue_result = split(list_part[1], " ; ", &size_part_issue_result); for (i = 0; i < size_part_issue_result; ++i) {