Fixed a bug in the OS-9 file systems file name validation function that caused it to incorrectly tolerate characters with the seventh bit set (#10802)

This commit is contained in:
npwoods 2023-01-07 15:02:07 -05:00 committed by GitHub
parent a2b0809ab3
commit e5cf5f93fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -651,7 +651,7 @@ bool coco_os9_impl::validate_filename(std::string_view name)
{
return !is_ignored_filename(name)
&& name.size() <= 29
&& std::find_if(name.begin(), name.end(), [](const char ch) { return ch == '\0' || ch == '/' || ch >= 0x80; }) == name.end();
&& std::find_if(name.begin(), name.end(), [](const char ch) { return ch == '\0' || ch == '/' || (ch & 0x80); }) == name.end();
}