bugfix: use memcpy() to get attributes longer than a byte properly written to packet header
This commit is contained in:
parent
08b2315f41
commit
64badeb282
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: chameleon-raw.c,v 1.4 2009/02/10 23:49:58 adamdunkels Exp $
|
* $Id: chameleon-raw.c,v 1.5 2009/03/05 13:51:28 zhitao Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -144,7 +144,7 @@ output(struct channel *c)
|
||||||
} else {
|
} else {
|
||||||
rimebuf_attr_t val;
|
rimebuf_attr_t val;
|
||||||
val = rimebuf_attr(a->type);
|
val = rimebuf_attr(a->type);
|
||||||
hdrptr[byteptr] = rimebuf_attr(a->type);
|
memcpy(&hdrptr[byteptr], &val, len / 8);
|
||||||
PRINTF("%d.%d: value %d\n",
|
PRINTF("%d.%d: value %d\n",
|
||||||
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
||||||
val);
|
val);
|
||||||
|
|
Loading…
Reference in a new issue