View Single Post
Old September 15, 2021, 19:38   #9
backwardsEric
Adept
 
Join Date: Aug 2019
Posts: 217
backwardsEric is on a distinguished road
Quote:
Originally Posted by clouded View Post
- I suspected something might be wrong earlier but after probing the final boss and then checking the game files it seems as though all monsters only get a single attack - the one that is listed last I guess.
That seems to be due to a problem in do_parse_monster_blow(), it likely should initialize b from *blow rather than setting it to NULL. As it is, only the last blow ends up being saved. Changing that would also plug a small memory leak. The "if (!r) return PARSE_ERROR_MISSING;" in that function likely should be moved to the callers, parse_monster_blow() and parse_monster_passive(), since r has already been dereferenced by that point.

I didn't run into any severe problems running Xygos on a Mac (11.5.1; self-compiled). There's a cosmetic issue in the point allocation at birth: the line giving the total points allocated overlaps with the saving throw display on the character sheet making it more difficult to read. Perhaps a bit of clearing before and after the total would help?

Xcode's leak checker reported some leaks. Here's the ones from loading an existing character:
  • The monster_mutation allocated in parse_monster_mut_name() is leaked. It looks like inserting a mem_free(r) after "n = (struct monster_mutation *) ..." in finish_parse_monster_mut() plugs that.
  • Memory allocated by string_make() in player_quests_reset() is leaked (6 allocations; 2.05 KiB total).
  • Memory allocated by mem_zalloc() in parse_flavor_flavor() is leaked (239 allocations; 48 bytes apiece; 11.2 KiB total).
  • Memory allocated by string_append() in parse_flavor_flavor() is leaked (236 allocations; 6.36 KiB total).
  • Memory allocated by string_make() in insert_string() (called by flavor_init()) is leaked (59 allocations; 16 bytes apiece; 944 bytes total).
  • Memory allocated by mem_realloc() in insert_string() (call by flavor_init()) is leaked (1 allocation; 512 bytes total).

Last edited by backwardsEric; September 15, 2021 at 19:39. Reason: inserted missing article
backwardsEric is offline   Reply With Quote