From dc10e8bda0edaca8e6a1fdaaea5087f9756ef817 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Fri, 13 Dec 2024 15:29:25 +0900 Subject: [PATCH] . --- main.c | 2 +- src/chkpass.c | 6 +++--- src/common.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 451fa0a..2fdce83 100644 --- a/main.c +++ b/main.c @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) { #elif defined (__HAIKU__) const char *cnfpath = "touch /boot/home/config/settings/sp/sp.conf"; #else - const char *cnfpath = "touch ~/config/sp.conf"; + const char *cnfpath = "touch ~/.config/sp.conf"; #endif printf("コンフィグファイルを見つけられません。" "「%s」を実効して下さい。\n", cnfpath); diff --git a/src/chkpass.c b/src/chkpass.c index a46be24..2e8c6dc 100644 --- a/src/chkpass.c +++ b/src/chkpass.c @@ -60,9 +60,9 @@ void chkCharPass(const char *path, const char *pass, char *lang) { int isSpecial = 0; for (size_t j = 0; j < strlen(pass); j++) { - if (isupper(pass[j])) isUpper = 1; - else if (islower(pass[j])) isLower = 1; - else if (isdigit(pass[j])) isDigit = 1; + if (isupper((int)pass[j])) isUpper = 1; + else if (islower((int)pass[j])) isLower = 1; + else if (isdigit((int)pass[j])) isDigit = 1; else if (strchr(spchar, pass[j])) isSpecial = 1; } diff --git a/src/common.c b/src/common.c index 89dbb18..02d9835 100644 --- a/src/common.c +++ b/src/common.c @@ -42,7 +42,7 @@ Config *getconfig() { cnf->syncenable = 0; cnf->passtimeout = 45; cnf->otptimeout = 30; - strncpy(cnf->language, "ja", sizeof(cnf->language) - 1); + memcpy(cnf->language, "ja", sizeof(cnf->language) - 1); cnf->language[sizeof(cnf->language) - 1] = '\0'; cnf->syncname[sizeof(cnf->syncname) - 1] = '\0'; -- 2.43.0