Bugs SVN

Do not post feature requests here, please.
Before posting bugs report check the Image Bug reporting help & guidelines
Forum rules
Do not post Features/Improvments request here (i.e : AI being stupid is not a bug, not being able to do a mulligan is not a bug, etc..etc..)
Before posting, please read the Bugs reporting guideline
leungclj
Posts: 347
Joined: Sat Nov 01, 2008 3:21 pm
Location: Hong Kong

Re: Bugs SVN

Post by leungclj »

superhiro wrote:Minor fix needed: Darklit Gargoyle has flying listed under auto= instead of abilities=.
r u sure?
????????????????????????????????????????????????????
orine
Posts: 6
Joined: Sun May 31, 2009 4:36 am

Re: Bugs SVN

Post by orine »

Hi all. Please excuse my report in poor english.
There is a bug in rev 375 (since rev 314), which starting the shop mode can cause a crash.
DeckDataWrapper::countByName() should be fixed (and improved) as bellow:

Code: Select all

Index: src/DeckDataWrapper.cpp
===================================================================
--- src/DeckDataWrapper.cpp     (revision 375)
+++ src/DeckDataWrapper.cpp     (working copy)
@@ -84,12 +84,12 @@
 int DeckDataWrapper::countByName(MTGCard * card){
   string name = card->name;
   int total = 0;
-  map<MTGCard *,int,Cmp1>::iterator it;
+  map<MTGCard *,int,Cmp1>::iterator it,it_origin;
   it = cards.find(card);
-  if(cards.find(card) == cards.end()){
+  if(it == cards.end()){
     cards[card] = 0;
     it = cards.find(card);
   }
+  it_origin = it;

    while(it !=cards.end()){
      MTGCard * _card = (*it).first;
@@ -101,7 +102,10 @@
      }
    }

-   it = cards.find(card);
+   it = it_origin;
+   if (it == cards.begin())
+     return total;
+
    it--;
    while(1){
      MTGCard * _card = (*it).first;
wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Bugs SVN

Post by wololo »

Thanks a lot, I experienced random crashes in the shop, and this could definitely be the cause for it.
I applied your patch to the latest revision.
Oh, and may I add that this is the first time I actually received a real patch for a bug in the code, so many thanks for that :)
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Bugs SVN

Post by Dr.Solomat »

wow! great work!
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
superhiro
Posts: 151
Joined: Thu Nov 13, 2008 1:28 pm

Re: Bugs SVN

Post by superhiro »

leungclj wrote:
superhiro wrote:Minor fix needed: Darklit Gargoyle has flying listed under auto= instead of abilities=.
r u sure?
Ah, I'm sorry, I messed up. It is "abilitites" instead of "abilities".
By the way, how can one get write access to the SVN?
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Bugs SVN

Post by Dr.Solomat »

my fault....
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
superhiro
Posts: 151
Joined: Thu Nov 13, 2008 1:28 pm

Re: Bugs SVN

Post by superhiro »

r396: Sphinx Summoner and Goblin Matron don't work, you can't target your library.

Also: You can't search for cards with shroud in the library, for example with Demonic Tutor.
wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Bugs SVN

Post by wololo »

Akron Legionnaire bug:
If you have 2 Akron Legionnaire cards in play, none of them can attack.
If both you and the AI have 2 Akron Legionnaire each (for example in Momir), you can play for as long as you wish, without anybody being able to attack...which gives:
Image
superhiro
Posts: 151
Joined: Thu Nov 13, 2008 1:28 pm

Re: Bugs SVN

Post by superhiro »

OMG, that looks so sick xD

Sorry for the spam, but I just had to say it ^^
wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Bugs SVN

Post by wololo »

Superhiro, please refrain from putting deck names longer than 8-9 characters for the AI, otherwise it causes graphical issues during deck selection, thanks
Post Reply