Dungeon Crawl Stone Soup Tracker - DCSS
Viewing Issue Advanced Details
7302 Patches major random 2013-07-04 00:42 2013-07-04 02:58
Zannick Both  
KiloByte All  
normal Both  
resolved 0.13 ancient branch  
done  
none    
none 0.13 ancient branch  
0007302: monster::reset leaves uninitialized memory in spells
This bug has surfaced due to http://s-z.org/neil/git/?p=crawl.git;a=commitdiff;h=e5352be0157e [^] stopping empty spell lists from being marshalled/unmarshalled.

Basically, monster::monster() creates a monster_spells FixedVector with uninitialized memory, and monster::reset() does not clear it (though monster::init_with() does). Since unmarshalling calls only reset(), the spells list remains uninitialized. The end result is that monsters that did not have any spells now have effectively random spell lists after loading saves.

This patch should clear the spell list in monster::init(), alleviating the issue.
? file icon 0001-Clear-the-spell-list-on-monster-init.patch [^] (681 bytes) 2013-07-04 00:42 [Show Content]
Issue History
2013-07-04 00:42 Zannick New Issue
2013-07-04 00:42 Zannick File Added: 0001-Clear-the-spell-list-on-monster-init.patch
2013-07-04 02:58 KiloByte Note Added: 0023385
2013-07-04 02:58 KiloByte Status new => resolved
2013-07-04 02:58 KiloByte Fixed in Branch => 0.13 development branch
2013-07-04 02:58 KiloByte Resolution open => done
2013-07-04 02:58 KiloByte Assigned To => KiloByte

Notes
(0023385)
KiloByte   
2013-07-04 02:58   
Applied half an hour ago, thanks!