]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/printf/PrintfP.nc
The big interface switchover for Packet, Send, Receive, and AMSend.
[tinyos-2.x.git] / tos / lib / printf / PrintfP.nc
index c69c809a5975bba0d22b5a48b0546172c718c143..5f4ae23110d7587cd358de7dd79c4e229f2a6be4 100644 (file)
@@ -83,7 +83,7 @@ implementation {
   }
   
   void sendNext() {
-    printf_msg_t* m = (printf_msg_t*)call Packet.getPayload(&printfMsg, NULL);
+    printf_msg_t* m = (printf_msg_t*)call Packet.getPayload(&printfMsg, sizeof(printf_msg_t));
     length_to_send = (bytes_left_to_flush < sizeof(printf_msg_t)) ? bytes_left_to_flush : sizeof(printf_msg_t);
     memset(m->buffer, 0, sizeof(printf_msg_t));
     memcpy(m->buffer, (nx_uint8_t*)next_byte, length_to_send);