/*
* Returns a pointer to the part of @path following the first colon in the last
- * path component, or NULL if the last path component does not contain a colon.
+ * path component, or NULL if the last path component does not contain a colon
+ * or has no characters following the first colon.
*/
const tchar *
path_stream_name(const tchar *path)
{
const tchar *base = path_basename(path);
const tchar *stream_name = tstrchr(base, T(':'));
- if (!stream_name)
+ if (stream_name == NULL || *(stream_name + 1) == T('\0'))
return NULL;
else
return stream_name + 1;