Commit ab80989f authored by DailyShana's avatar DailyShana

clean up

len paramter of preload_script is useless
parent 7ea1a305
......@@ -218,7 +218,7 @@ bool ReplayMode::StartDuel() {
size_t slen = cur_replay.ReadInt16();
cur_replay.ReadData(filename, slen);
filename[slen] = 0;
if(!preload_script(pduel, filename, slen)) {
if(!preload_script(pduel, filename, 0)) {
return false;
}
}
......
......@@ -56,11 +56,11 @@ int SingleMode::SinglePlayThread(void* param) {
if(open_file) {
open_file = false;
slen = BufferIO::EncodeUTF8(open_file_name, filename);
if(!preload_script(pduel, filename, slen)) {
if(!preload_script(pduel, filename, 0)) {
wchar_t fname[256];
myswprintf(fname, L"./single/%ls", open_file_name);
slen = BufferIO::EncodeUTF8(fname, filename);
if(!preload_script(pduel, filename, slen))
if(!preload_script(pduel, filename, 0))
slen = 0;
}
} else {
......@@ -68,7 +68,7 @@ int SingleMode::SinglePlayThread(void* param) {
wchar_t fname[256];
myswprintf(fname, L"./single/%ls", name);
slen = BufferIO::EncodeUTF8(fname, filename);
if(!preload_script(pduel, filename, slen))
if(!preload_script(pduel, filename, 0))
slen = 0;
}
if(slen == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment