Crash in cleanup_r

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kramborn
    Rookie
    • Apr 2012
    • 10

    Crash in cleanup_r

    I pulled b1011f7.
    It crashes after stopping games,

    Following patch works to fix it.


    Code:
    --- a/src/monster/mon-init.c
    +++ b/src/monster/mon-init.c
    @@ -649,11 +649,11 @@ static void cleanup_r(void)
                            f = fn;
                    }
                    while (fb) {
    -               fb = r->friends_base;
    +               if (fb = r->friends_base) {
                            fbn = fb->next;
                            mem_free(fb);
                            fb = fbn;
    -               }               
    +               }}
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    #2
    FWIW, the patch works for me.

    Comment

    • PowerWyrm
      Prophet
      • Apr 2008
      • 2987

      #3
      Code:
      fb = r->friends_base;
      should be out of the while() loop, that's all...
      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎