From 8664e705fb22c712bb6e1c8dd390af2724c40e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 18 Jul 2018 14:25:26 +0200 Subject: [PATCH] make file ending detection slightly more stable currently the tool crashes if the file ending has 5 or more letters (like .jffs2) --- project.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/project.c b/project.c index c8a76ce..93b38ab 100755 --- a/project.c +++ b/project.c @@ -195,9 +195,17 @@ int GetFileFormatFromExt(const char* csPath) while(csPath[i] != '.') { + if (i==0) { + return BIN; + } + i--; } + if (length-i > 5) { + return BIN; + } + for(j=i;j