Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gframe/data_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ std::wstring DataManager::FormatType(unsigned int type) const {
}
std::wstring DataManager::FormatSetName(const uint16_t setcode[]) const {
std::wstring buffer;
for(int i = 0; i < 10; ++i) {
for(int i = 0; i < SIZE_SETCODE; ++i) {
if (!setcode[i])
break;
const wchar_t* setname = GetSetName(setcode[i]);
Expand Down
9 changes: 4 additions & 5 deletions gframe/gframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) {
ygo::Game _game;
ygo::mainGame = &_game;
if(!ygo::mainGame->Initialize())
return 0;
return EXIT_FAILURE;

#ifdef _WIN32
int wargc = 0;
Expand All @@ -70,16 +70,15 @@ int main(int argc, char* argv[]) {
bool keep_on_return = false;
bool deckCategorySpecified = false;
for(int i = 1; i < wargc; ++i) {
if (wargc == 2 && std::wcslen(wargv[1]) >= 4) {
wchar_t* pstrext = wargv[1] + std::wcslen(wargv[1]) - 4;
if (!mywcsncasecmp(pstrext, L".ydk", 4)) {
if (wargc == 2) {
if (ygo::IsExtension(wargv[1], L".ydk")) {
ygo::mainGame->open_file = true;
BufferIO::CopyWideString(wargv[1], ygo::mainGame->open_file_name);
ygo::mainGame->exit_on_return = true;
ClickButton(ygo::mainGame->btnDeckEdit);
break;
}
if (!mywcsncasecmp(pstrext, L".yrp", 4)) {
if (ygo::IsExtension(wargv[1], L".yrp")) {
ygo::mainGame->open_file = true;
BufferIO::CopyWideString(wargv[1], ygo::mainGame->open_file_name);
ygo::mainGame->exit_on_return = true;
Expand Down
4 changes: 2 additions & 2 deletions gframe/single_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
}
case MSG_HINT: {
/*int type = */BufferIO::Read<uint8_t>(pbuf);
int player = BufferIO::Read<uint8_t>(pbuf);
player = BufferIO::Read<uint8_t>(pbuf);
/*int data = */BufferIO::Read<int32_t>(pbuf);
if(player == 0)
DuelClient::ClientAnalyze(offset, pbuf - offset);
Expand Down Expand Up @@ -391,7 +391,7 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
}
case MSG_SHUFFLE_HAND: {
/*int oplayer = */BufferIO::Read<uint8_t>(pbuf);
int count = BufferIO::Read<uint8_t>(pbuf);
count = BufferIO::Read<uint8_t>(pbuf);
pbuf += count * 4;
DuelClient::ClientAnalyze(offset, pbuf - offset);
break;
Expand Down