From aadb0579b4cb87f0acfb561133a8e62ca62f5a81 Mon Sep 17 00:00:00 2001 From: Wilhansen Li Date: Fri, 30 Dec 2016 12:25:17 +0800 Subject: [PATCH] Fix bug in appending trailing slash on input dir. --- dtbTool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtbTool.c b/dtbTool.c index 9b28396..680019b 100644 --- a/dtbTool.c +++ b/dtbTool.c @@ -133,7 +133,7 @@ int parse_commandline(int argc, char *const argv[]) input_dir = optarg; { int len = strlen(input_dir); - if ( len > 1 && input_dir[len - 2] != '/' ) { + if ( len > 1 && input_dir[len - 1] != '/' ) { input_dir = malloc(len + 2); strcpy(input_dir, optarg); input_dir[len] = '/'; -- 2.20.1