mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
AK: Don't crash on empty extension in LexicalPath::has_extension
... on Windows
This commit is contained in:
parent
6b661a91c6
commit
dcfc552d25
|
|
@ -60,7 +60,7 @@ Vector<ByteString> LexicalPath::parts() const
|
|||
|
||||
bool LexicalPath::has_extension(StringView extension) const
|
||||
{
|
||||
if (extension[0] == '.')
|
||||
if (extension.starts_with('.'))
|
||||
extension = extension.substring_view(1);
|
||||
return m_extension.equals_ignoring_ascii_case(extension);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user