(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/branches/1.4@76067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-07-20 17:10:17 +00:00
parent 34b000a0e7
commit 95be40cb27

View File

@@ -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;