Commit 45f2646f authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro into server

parents 1241703f 993ba1fc
......@@ -80,8 +80,8 @@ inline void ShowBigCard(int code, float zoom) {
inline void ZoomBigCard(s32 centerx = -1, s32 centery = -1) {
if(mainGame->deckBuilder.bigcard_zoom >= 4)
mainGame->deckBuilder.bigcard_zoom = 4;
if(mainGame->deckBuilder.bigcard_zoom <= 0.2)
mainGame->deckBuilder.bigcard_zoom = 0.2;
if(mainGame->deckBuilder.bigcard_zoom <= 0.2f)
mainGame->deckBuilder.bigcard_zoom = 0.2f;
ITexture* img = imageManager.GetBigPicture(mainGame->deckBuilder.bigcard_code, mainGame->deckBuilder.bigcard_zoom);
mainGame->imgBigCard->setImage(img);
auto size = img->getSize();
......@@ -310,12 +310,12 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break;
}
case BUTTON_BIG_CARD_ZOOM_IN: {
bigcard_zoom += 0.2;
bigcard_zoom += 0.2f;
ZoomBigCard();
break;
}
case BUTTON_BIG_CARD_ZOOM_OUT: {
bigcard_zoom -= 0.2;
bigcard_zoom -= 0.2f;
ZoomBigCard();
break;
}
......
......@@ -398,7 +398,8 @@ void SingleDuel::UpdateDeck(DuelPlayer* dp, void* pdata, unsigned int len) {
int mainc = BufferIO::ReadInt32(deckbuf);
int sidec = BufferIO::ReadInt32(deckbuf);
// verify data
if((unsigned)mainc + (unsigned)sidec > (len - 8) / 4) {
const unsigned int possibleMaxLength = (len - 8) / 4;
if((unsigned)mainc > possibleMaxLength || (unsigned)sidec > possibleMaxLength || (unsigned)mainc + (unsigned)sidec > possibleMaxLength) {
STOC_ErrorMsg scem;
scem.msg = ERRMSG_DECKERROR;
scem.code = 0;
......
......@@ -376,7 +376,8 @@ void TagDuel::UpdateDeck(DuelPlayer* dp, void* pdata, unsigned int len) {
int mainc = BufferIO::ReadInt32(deckbuf);
int sidec = BufferIO::ReadInt32(deckbuf);
// verify data
if((unsigned)mainc + (unsigned)sidec > (len - 8) / 4) {
const unsigned int possibleMaxLength = (len - 8) / 4;
if((unsigned)mainc > possibleMaxLength || (unsigned)sidec > possibleMaxLength || (unsigned)mainc + (unsigned)sidec > possibleMaxLength) {
STOC_ErrorMsg scem;
scem.msg = ERRMSG_DECKERROR;
scem.code = 0;
......
This diff is collapsed.
Subproject commit 9fd3931ae631015ca02013314f3ae07bdd8f2208
Subproject commit 0ce152512c02c7a3289ae81610d284143860f07b
Subproject commit a12f29bf382defb21043e2b8de967f867477192b
Subproject commit 20136f45baaf2661f312be68677e7b466c8da00c
......@@ -603,6 +603,7 @@
!counter 0x58 指示物(祢须三破鸣比)
!counter 0x59 落魂指示物
!counter 0x5a 指示物(岩战之试炼)
!counter 0x5b 指示物(北极天熊北斗星)
#setnames, using tab for comment
!setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス
......@@ -1063,3 +1064,6 @@
!setname 0x15e 降阶魔法 RDM
!setname 0x15f 岩战 War Rock
!setname 0x160 源质兽 Materiactor
!setname 0x161 溟界
!setname 0x162 七音服 ドレミコード
!setname 0x163 北极天熊 ベアルクティ
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