From 2c2af928fe97915efdda15b82e7ca276f7a6f4ad Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Fri, 20 Jul 2007 17:11:39 +0000 Subject: [PATCH] Merged revisions 76067 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76067 | file | 2007-07-20 14:10:17 -0300 (Fri, 20 Jul 2007) | 6 lines (closes issue #10246) Reported by: fkasumovic Patches: res_conver.patch uploaded by fkasumovic (license #101) Use the last occurance of . to find the extension, not the first occurance. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76070 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_convert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/res/res_convert.c b/res/res_convert.c index 628381aa9d..be3d177ebe 100644 --- a/res/res_convert.c +++ b/res/res_convert.c @@ -45,7 +45,10 @@ static int split_ext(char *filename, char **name, char **ext) { *name = *ext = filename; - strsep(ext, "."); + if ((*ext = strrchr(filename, '.'))) { + **ext = '\0'; + (*ext)++; + } if (ast_strlen_zero(*name) || ast_strlen_zero(*ext)) return -1; -- 2.47.2