Fix load bug

This commit is contained in:
kichikuou
2017-04-30 20:58:38 +09:00
parent 71728db664
commit 7c233fd9a0
3 changed files with 12 additions and 6 deletions
+2 -6
View File
@@ -5,7 +5,6 @@
*/
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "nact.h"
#include "ags.h"
@@ -13,8 +12,6 @@
#include "crc32.h"
#include "../fileio.h"
extern _TCHAR g_root[_MAX_PATH];
void NACT::cmd_calc()
{
int index = getd();
@@ -1602,13 +1599,12 @@ void NACT::cmd_y()
break;
case 239:
{
_TCHAR path[_MAX_PATH], file_path[_MAX_PATH];
_TCHAR path[_MAX_PATH];
_tcscpy_s(path, _MAX_PATH, _T("ASLEEP_A.DAT"));
path[7] = _T('A') + param - 1;
_stprintf_s(file_path, _MAX_PATH, _T("%s%s"), g_root, path);
struct stat statbuf;
if (stat(file_path, &statbuf) != -1) {
if (FILEIO::StatSavedata(path, &statbuf) != -1) {
struct tm *t = localtime(&statbuf.st_mtime);
D01 = t->tm_year + 1900;
D02 = t->tm_mon + 1;