summaryrefslogtreecommitdiff
path: root/src/qcommon/msg.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2011-04-23 22:38:25 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:07 +0000
commit06006eb6930de74c577c87daf6a0f7917e22d578 (patch)
tree8caec25df040a3f3eddc99b593e51d993b9be1be /src/qcommon/msg.c
parent98438cc3e7d32312bb52b413c12698b67b8cfeb0 (diff)
* Merge ioq3-r1946
Diffstat (limited to 'src/qcommon/msg.c')
-rw-r--r--src/qcommon/msg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcommon/msg.c b/src/qcommon/msg.c
index ba956bc8..05a7aa9f 100644
--- a/src/qcommon/msg.c
+++ b/src/qcommon/msg.c
@@ -885,7 +885,7 @@ void MSG_WriteDeltaEntity( msg_t *msg, struct entityState_s *from, struct entity
float fullFloat;
int *fromF, *toF;
- numFields = sizeof(entityStateFields)/sizeof(entityStateFields[0]);
+ numFields = ARRAY_LEN( entityStateFields );
// all fields should be 32 bits to avoid any compiler packing issues
// the "number" field is not part of the field list
@@ -1030,7 +1030,7 @@ void MSG_ReadDeltaEntity( msg_t *msg, entityState_t *from, entityState_t *to,
return;
}
- numFields = sizeof(entityStateFields)/sizeof(entityStateFields[0]);
+ numFields = ARRAY_LEN( entityStateFields );
lc = MSG_ReadByte(msg);
if ( lc > numFields || lc < 0 ) {
@@ -1203,7 +1203,7 @@ void MSG_WriteDeltaPlayerstate( msg_t *msg, struct playerState_s *from, struct p
c = msg->cursize;
- numFields = sizeof( playerStateFields ) / sizeof( playerStateFields[0] );
+ numFields = ARRAY_LEN( playerStateFields );
lc = 0;
for ( i = 0, field = playerStateFields ; i < numFields ; i++, field++ ) {
@@ -1353,7 +1353,7 @@ void MSG_ReadDeltaPlayerstate (msg_t *msg, playerState_t *from, playerState_t *t
print = 0;
}
- numFields = sizeof( playerStateFields ) / sizeof( playerStateFields[0] );
+ numFields = ARRAY_LEN( playerStateFields );
lc = MSG_ReadByte(msg);
if ( lc > numFields || lc < 0 ) {