Don't remove extension if there's isn't one (fixes new segfault.)

This commit is contained in:
ehouse 2008-12-08 05:50:25 +00:00
parent ad459c8a0a
commit 481374936d

View file

@ -201,7 +201,9 @@ ceBasename( wchar_t* buf, const wchar_t* path )
--ptr;
}
lstrcpy( buf, ptr );
buf[dot-ptr] = 0; /* nuke extension */
if ( !!dot ) {
buf[dot-ptr] = 0; /* nuke extension */
}
} /* ceBasename */
/* Probably belongs as a utility */