mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
AK: Don't crash on empty extension in LexicalPath::has_extension
... on Windows
This commit is contained in:
parent
6b661a91c6
commit
dcfc552d25
Notes:
github-actions[bot]
2025-02-17 13:58:02 +00:00
Author: https://github.com/stasoid
Commit: dcfc552d25
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3599
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue