aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/opendeco-cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/opendeco-cli.c')
-rw-r--r--src/opendeco-cli.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/opendeco-cli.c b/src/opendeco-cli.c
index f9f510e..481ef66 100644
--- a/src/opendeco-cli.c
+++ b/src/opendeco-cli.c
@@ -10,13 +10,14 @@
#include "toml/LICENSE.h"
#include "minunit/LICENSE.h"
-#define print_xxd_arr(name, arrname) \
- do { \
- wprintf(L"--------\n\n"); \
- wprintf(L"License for: %s\n\n", name); \
- for (int i = 0; i < arrname##_len; i++) \
- putwchar(arrname[i]); \
- wprintf(L"\n"); \
+#define print_xxd_arr(name, arrname) \
+ do { \
+ char *tmp = strndup((const char *) arrname, arrname##_len); \
+ wprintf(L"--------\n\n"); \
+ wprintf(L"License for: %s\n\n", name); \
+ wprintf(L"%s", tmp); \
+ wprintf(L"\n"); \
+ free(tmp); \
} while (0)
static char args_doc[] = "";