From 8ea29e0f3eb593cf474a17661662aa823aff36b2 Mon Sep 17 00:00:00 2001 From: nguyentienanh2303 Date: Wed, 2 Sep 2020 15:46:54 +0700 Subject: [PATCH] fix too many or too few labels error when train a classifier for both linux and windows --- src/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data.c b/src/data.c index 1731bc22..62333450 100644 --- a/src/data.c +++ b/src/data.c @@ -546,7 +546,7 @@ void fill_truth(char *path, char **labels, int k, float *truth) char *filename = ""; for (i = strlen(path) - 1; i >= 0; --i) { if (path[i] == '/' || path[i] == '\\') { - filename = malloc(strlen(path + i) + 1); + filename = (char*)malloc(strlen(path + i) + 1); strcpy(filename, path + i + 1); break; }