I believe that these are alsways non-zero.

This commit is contained in:
Enno Rehling 2012-05-15 15:02:21 -07:00
parent 5a8a1704e7
commit 5de2e790a3

View file

@ -48,7 +48,7 @@ void cw_write(const attrib * a, const void *target, storage * store)
store->w_int(store, b->id); store->w_int(store, b->id);
} }
typedef struct bresvole { typedef struct bresolve {
unsigned int id; unsigned int id;
curse *self; curse *self;
} bresolve; } bresolve;
@ -88,9 +88,10 @@ static int resolve_buddy(variant data, void *addr)
{ {
curse *result = NULL; curse *result = NULL;
bresolve *br = (bresolve *) data.v; bresolve *br = (bresolve *) data.v;
connection *b;
if (br->id >= 0) { assert(br->id > 0);
connection *b = find_border(br->id); b = find_border(br->id);
if (b && b->from && b->to) { if (b && b->from && b->to) {
attrib *a = a_find(b->from->attribs, &at_cursewall); attrib *a = a_find(b->from->attribs, &at_cursewall);
@ -122,7 +123,6 @@ static int resolve_buddy(variant data, void *addr)
*(curse **) addr = NULL; *(curse **) addr = NULL;
return -1; return -1;
} }
}
*(curse **) addr = result; *(curse **) addr = result;
return 0; return 0;
} }