--- nono/host/hostwindrv.cpp 2026/04/29 17:05:30 1.1.1.2 +++ nono/host/hostwindrv.cpp 2026/04/29 17:05:55 1.1.1.4 @@ -9,6 +9,7 @@ // #include "hostwindrv.h" +#include "ascii_ctype.h" #include #include #include @@ -48,7 +49,7 @@ HostWindrv::InitRootPath(const std::stri // ルートパスのほうは末尾の '/' なし。 // ゲストパスが必ず '/' から始まるため。 - while (*rootpath.rbegin() == '/') { + while (rootpath.empty() == false && rootpath.back() == '/') { rootpath.pop_back(); } if (rootpath.empty()) { @@ -390,7 +391,7 @@ HostWindrv::IsHuman68kFilename(const cha for (auto c : name) { // TODO: 記号どこまで使えるか調べる - if (!isalnum((int)c) && strchr("-._", c) == NULL) { + if (!is_ascii_alnum(c) && strchr("-._", c) == NULL) { return false; } }