From 9f0c7a87fd1b3363c64d332715e887e270cc75d2 Mon Sep 17 00:00:00 2001 From: Hugo Saint-Vignes Date: Tue, 5 Jan 2021 09:30:14 +0100 Subject: [PATCH] [apps/shared] Use sizeof data --- apps/shared/curve_view_range.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/shared/curve_view_range.cpp b/apps/shared/curve_view_range.cpp index f88e6b22e..46196263d 100644 --- a/apps/shared/curve_view_range.cpp +++ b/apps/shared/curve_view_range.cpp @@ -11,7 +11,7 @@ namespace Shared { uint32_t CurveViewRange::rangeChecksum() { float data[7] = {xMin(), xMax(), yMin(), yMax(), xGridUnit(), yGridUnit(), offscreenYAxis()}; - size_t dataLengthInBytes = 7*sizeof(float); + size_t dataLengthInBytes = sizeof(data); assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4 return Ion::crc32Word((uint32_t *)data, dataLengthInBytes/sizeof(uint32_t)); }