Server Help

ASSS Questions - Possible asss error in objects.c

Everguest - Sun Jul 09, 2006 7:28 pm
Post subject: Possible asss error in objects.c
Shouldn't

Code: Show/Hide
#define BEGIN_EXTENDED(t, id) \
   byte pkt[1 + sizeof(struct ObjectMove)]; \
   struct ObjectMove *objm = (struct ObjectMove *)(pkt + 1); \
   if (t->type != T_ARENA) return; \
   aodata *ad = P_ARENA_DATA(t->u.arena, aokey); \
   lvzdata *node; \
   pkt[0] = S2C_MOVEOBJECT; \
   MUTEX_LOCK(ad); \
   if ((node = getDataFromId(&ad->list, id))) \
   { \
      memcpy((byte*)objm + 1, &node->current, sizeof(struct ObjectData))


be

Code: Show/Hide
#define BEGIN_EXTENDED(t, id) \
   byte pkt[1 + sizeof(struct ObjectMove)]; \
   struct ObjectMove *objm = (struct ObjectMove *)(pkt + 1); \
   aodata *ad; \
   lvzdata *node; \
   if (t->type != T_ARENA) return; \
   ad = P_ARENA_DATA(t->u.arena, aokey); \
   pkt[0] = S2C_MOVEOBJECT; \
   MUTEX_LOCK(ad); \
   if ((node = getDataFromId(&ad->list, id))) \
   { \
      memcpy((byte*)objm + 1, &node->current, sizeof(struct ObjectData))

Smong - Sun Jul 09, 2006 8:42 pm
Post subject:
Did you just move the variable declarations? I think that depends on how strict your compiler is.

Also just a reminder to grelminar:
http://asss.yi.org/bugs/view.php?id=66
Which also fixes the declaration of those local variables.
Grelminar - Sat Jul 29, 2006 8:17 pm
Post subject:
Yes, it should be. Fixed.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group