diff --git a/tensorflow/lite/micro/micro_allocator.cc b/tensorflow/lite/micro/micro_allocator.cc index 807319f9d04..f28ae0decca 100644 --- a/tensorflow/lite/micro/micro_allocator.cc +++ b/tensorflow/lite/micro/micro_allocator.cc @@ -435,7 +435,7 @@ TfLiteStatus MicroAllocator::InitializeRuntimeTensor( (src_quantization->zero_point()->size() > 0)) { result->params.scale = src_quantization->scale()->Get(0); // This magic handles issues with little-endianness. - for (unsigned int b = 0; b < sizeof(sizeof(result->params.zero_point)); ++b) + for (unsigned int b = 0; b < sizeof(result->params.zero_point); ++b) *(reinterpret_cast(&result->params.zero_point) + b) = *(reinterpret_cast( src_quantization->zero_point()->Data()) +