Azure IoT common library
Dependents: STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more
Diff: constbuffer.c
- Revision:
- 11:77df6d7e65ae
- Parent:
- 6:c55b013dfc2a
- Child:
- 19:2e0811512ceb
--- a/constbuffer.c Fri Aug 26 12:59:40 2016 -0700 +++ b/constbuffer.c Fri Sep 09 13:38:26 2016 -0700 @@ -98,7 +98,9 @@ } else { - result = (CONSTBUFFER_HANDLE_DATA*)CONSTBUFFER_Create_Internal(BUFFER_u_char(buffer), BUFFER_length(buffer)); + size_t length = BUFFER_length(buffer); + unsigned char* rawBuffer = BUFFER_u_char(buffer); + result = (CONSTBUFFER_HANDLE_DATA*)CONSTBUFFER_Create_Internal(rawBuffer, length); } return (CONSTBUFFER_HANDLE)result; }