diff options
author | Frederic Culot <culot@FreeBSD.org> | 2019-06-21 10:05:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 10:05:42 +0200 |
commit | b0f0b1b4718758dc2960716fa7ecac09ed35a0c1 (patch) | |
tree | 1a9884e1687ecb5ead4eba025538edecf98ba5e8 /money.c | |
parent | 2b3b9dc4649727851004b8223b6af38b57c0c790 (diff) | |
parent | aaeb189cb2e7eb6eb95188c707791be71067e802 (diff) | |
download | oldrunner-b0f0b1b4718758dc2960716fa7ecac09ed35a0c1.tar.gz |
Merge pull request #1 from polettix/patch-1
Remove segfault
Diffstat (limited to 'money.c')
-rw-r--r-- | money.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,6 @@ /* $Id: money.c,v 1.1.1.1 2010/07/17 17:30:32 culot Exp $ */ +/* vim: et ai sts=2 ts=2 sw=2: + * */ /* * Copyright (c) 2010 Frederic Culot <frederic@culot.org> @@ -51,7 +53,7 @@ money_free (void) while (!SLIST_EMPTY (&money_list)) { struct money *m; - + m = SLIST_FIRST (&money_list); SLIST_REMOVE_HEAD (&money_list, moneyp); xfree (m); @@ -72,7 +74,7 @@ void money_draw (void) { struct money *m; - + SLIST_FOREACH (m, &money_list, moneyp) gfx_show_sprite (SP_MONEY, &m->pos); } @@ -81,7 +83,7 @@ void money_check_at (const struct coord *hero_pos) { struct money *m; - + SLIST_FOREACH (m, &money_list, moneyp) { if (coord_equal (&m->pos, hero_pos)) |