Skip to content

Commit 31bb00f

Browse files
Zegerieagleivg
authored andcommitted
Fix _splitpath returning incorrect extension
_splitpath is supposed to return the dot before the extension.
1 parent bfb7a0b commit 31bb00f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Common/PlatformLinux.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ inline void _splitpath (
124124
{
125125
char tmp_ext[NAME_MAX] = { 0 };
126126
strcpy(tmp_ext, basename(tmp));
127-
char *pos = strrchr(fname, '.');
127+
char *pos = strrchr(tmp_ext, '.');
128128
if(pos != NULL)
129-
strcpy(ext, pos + 1);
129+
strcpy(ext, pos);
130130
else
131131
strcpy(ext, "");
132132
}

0 commit comments

Comments
 (0)