Page 1 of 1

[Fixed all]Sparkcaster segfaults, no dmg

PostPosted: 30 Jul 2018, 16:24
by Korath
Describe the Bug:
  1. Sparkcaster segfaults when its etb trigger resolves.
  2. Even if it didn't, its prompt would be wrong.
  3. Even if it didn't, it doesn't deal damage, since it has Shivan Wurm's function.
Which card did behave improperly ?
gating(), gating(), and Sparkcaster, respectively.

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Dev master head, 6287802.

What exactly should be the correct behavior/interaction ?
  1. get_sleighted_color_text() expects a color_t, not a color_test_t.
  2. get_sleighted_color_text() returns a pointer to static data, so you can't call it twice with different arguments in the same call to sprintf() and expect to get different output. get_sleighted_color_text2() exists for this use case.
  3. It has a second etb trigger dealing 1 damage to target player or planeswalker.
Are any other cards possibly affected by this bug ?
For A and B, Cavern Harpy, Doomsday Specter, Fleetfoot Panther, Horned Kavu, Lava Zombie, Marsh Crocodile, Sawtooth Loon, and Shivan Wurm.

Re: [confirm]Sparkcaster segfaults, no dmg

PostPosted: 31 Jul 2018, 08:27
by Aswan jaguar
Obviously I confirm the first bug I can't test the others without understanding the code or fixing the 1st bug.

Re: [confirm]Sparkcaster segfaults, no dmg

PostPosted: 31 Jul 2018, 10:36
by Aswan jaguar
It happened that I am playing with these cards last couple of days and I can say that Marsh Crocodile at least doesn't segfaults when its etb trigger resolves. It does have the 2nd bug wrong prompt:
2018-07-31_133319marsh.jpg

I had the etb error also with Silver Drake.

Re: [confirm]Sparkcaster segfaults, no dmg

PostPosted: 31 Jul 2018, 19:53
by Korath
The others that are just black and/or blue won't crash either, since COLOR_TEST_BLUE and COLOR_TEST_BLACK happen to share values with valid COLOR_* constants. They'll make you bounce red creatures instead of blue, though, and blue ones instead of black.

I remember seeing Silver Drake in my grep results, not sure how it got left out of my post.

Re: [confirm]Sparkcaster segfaults, no dmg

PostPosted: 21 Jul 2019, 14:42
by Aswan jaguar
Fixed crash issues in c7b139ae. Sparkcaster 's own code address in 6b211e08.