From: 諏訪子 Date: Fri, 13 Dec 2024 06:29:25 +0000 (+0900) Subject: . X-Git-Url: http://10.11.0.4:5575/?a=commitdiff_plain;h=dc10e8bda0edaca8e6a1fdaaea5087f9756ef817;p=sp.git . --- 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';