From c0cb1d3bfbc70afd3af5ba7998301e38995726e1 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 22 Aug 2016 22:42:19 -0300 Subject: [PATCH] eeshow/kicad/pro.c (pro_parse_file): strchr vs. strrchr ... --- eeshow/kicad/pro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeshow/kicad/pro.c b/eeshow/kicad/pro.c index 41082cd..f077fe3 100644 --- a/eeshow/kicad/pro.c +++ b/eeshow/kicad/pro.c @@ -102,7 +102,8 @@ struct file_names *pro_parse_file(struct file *file, assert(pro.fn->pro); s = stralloc(pro.fn->pro); - dot = strchr(s, '.'); + dot = strrchr(s, '.'); + assert(!strcmp(dot, ".pro")); strcpy(dot, ".sch"); pro.fn->sch = s; }