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
{
*name = *ext = filename;
- strsep(ext, ".");
+ if ((*ext = strrchr(filename, '.'))) {
+ **ext = '\0';
+ (*ext)++;
+ }
if (ast_strlen_zero(*name) || ast_strlen_zero(*ext))
return -1;