From e5cf5f93fa72222a6decd709b93123776687fbc7 Mon Sep 17 00:00:00 2001 From: npwoods Date: Sat, 7 Jan 2023 15:02:07 -0500 Subject: [PATCH] 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) --- src/lib/formats/fs_coco_os9.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/formats/fs_coco_os9.cpp b/src/lib/formats/fs_coco_os9.cpp index f72ae772f8f..f94ff290799 100644 --- a/src/lib/formats/fs_coco_os9.cpp +++ b/src/lib/formats/fs_coco_os9.cpp @@ -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(); }