Anonymous | Login | Signup for a new account | 2024-11-26 09:33 PST |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||
ID | Project | Category | View Status | Date Submitted | Last Update | |
0006440 | Dwarf Fortress | Artistic Images (engravings etc) | public | 2014-02-21 08:26 | 2014-07-23 10:28 | |
Reporter | Quietust | |||||
Assigned To | Toady One | |||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |
Status | resolved | Resolution | fixed | |||
Platform | OS | OS Version | ||||
Product Version | 0.34.11 | |||||
Target Version | Fixed in Version | 0.40.05 | ||||
Summary | 0006440: Art facet modifiers not properly applied for creature images, casting wrong pointer | |||||
Description | When trading decorated items with caravans, items bearing images of creatures are intended to adjust their value according to certain properties (e.g. GOOD, EVIL, FANCIFUL, OWN_RACE), but this logic does not appear to work correctly. It looks like it's trying to caste a pointer of type "art_image_elementst" to "art_image_element_creaturest", but it's using the pointer for the art_image itself rather than the element within it; as a result, the race/caste values are complete garbage (specifically, pointers inside an std::vector). | |||||
Additional Information | This was found during analysis of version 0.23.130.23a and subsequently confirmed to still exist in version 0.34.11. | |||||
Tags | binary patch | |||||
Attached Files | ||||||
Relationships | ||||||
|
Notes | |
(0024547) Quietust (reporter) 2014-02-21 08:30 |
Effectively, the code appears to be as follows: art_image *img = improvements[i]->getImage(); ... if (img->elements[i]->getType() == ART_IMAGE_ELEMENT_CREATURE) { art_image_element_creaturest *element = (art_image_element_creaturest *)img; // should be img->elements[i] value += getCreatureImageValue(entity, element->race, element->caste); } |
(0024568) Quietust (reporter) 2014-02-25 20:16 |
And now that this bug has been tagged with "binary patch", I feel obligated to actually provide one: Win32 0.34.11 SDL: 0x01305A5 : 0F B7 4E 08 66 8B 46 0C -> 66 8B 41 0C 0F B7 49 08 |
Issue History | |||
Date Modified | Username | Field | Change |
2014-02-21 08:26 | Quietust | New Issue | |
2014-02-21 08:30 | Quietust | Note Added: 0024547 | |
2014-02-21 10:54 | Footkerchief | Tag Attached: binary patch | |
2014-02-25 20:16 | Quietust | Note Added: 0024568 | |
2014-03-06 10:05 | Footkerchief | Relationship added | related to 0001285 |
2014-03-25 13:16 | Dwarfu | Assigned To | => Dwarfu |
2014-03-25 13:16 | Dwarfu | Status | new => acknowledged |
2014-07-23 10:28 | Toady One | Status | acknowledged => resolved |
2014-07-23 10:28 | Toady One | Fixed in Version | => Next Version |
2014-07-23 10:28 | Toady One | Resolution | open => fixed |
2014-07-23 10:28 | Toady One | Assigned To | Dwarfu => Toady One |
Copyright © 2000 - 2010 MantisBT Group |