Revision: 9995 https://osdn.net/projects/ttssh2/scm/svn/commits/9995 Author: zmatsuo Date: 2022-06-11 00:20:13 +0900 (Sat, 11 Jun 2022) Log Message: ----------- iniファイル読み込み時に異常終了することがあったので修正 Modified Paths: -------------- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c -------------- next part -------------- Modified: trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c =================================================================== --- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c 2022-06-10 15:20:03 UTC (rev 9994) +++ trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c 2022-06-10 15:20:13 UTC (rev 9995) @@ -344,7 +344,7 @@ if (!p) { return; } - wcsncpy_s(p+1, sizeof(sect) - ((p+1)-sect), fn, _TRUNCATE); + wcsncpy_s(p+1, _countof(sect) - ((p+1)-sect), fn, _TRUNCATE); } GetPrivateProfileStringAFileW(SECTION, "Command", "", pvar->orgCommand, sizeof(pvar->orgCommand), sect);