Handle case where a directory contains a '." but the
filename doesn't (i.e. has no extension)
Modified: trunk/reactos/lib/crt/stdlib/splitp.c
_____
Modified: trunk/reactos/lib/crt/stdlib/splitp.c
--- trunk/reactos/lib/crt/stdlib/splitp.c 2005-05-15 21:11:37 UTC
(rev 15320)
+++ trunk/reactos/lib/crt/stdlib/splitp.c 2005-05-15 21:28:44 UTC
(rev 15321)
@@ -44,8 +44,9 @@
}
}
- tmp_ext = (_TCHAR*)_tcsrchr(path,'.');
- if (!tmp_ext)
+ /* If the dot is before the last dir separator, it's part
+ * of a directory name, not the start of the extension */
+ if (!tmp_ext || tmp_ext < tmp_dir)
{
tmp_ext = (_TCHAR*)path+_tcslen(path);
}