From 3bf5c3b6ba96d9934d8334b70d98be7280a9e071 Mon Sep 17 00:00:00 2001 From: mculover666 <2412828003@qq.com> Date: Wed, 24 Jun 2020 17:08:29 +0800 Subject: [PATCH] fix ota bug --- components/ota/common/partition/ota_partition.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ota/common/partition/ota_partition.h b/components/ota/common/partition/ota_partition.h index b72b72b2..1124dc1c 100644 --- a/components/ota/common/partition/ota_partition.h +++ b/components/ota/common/partition/ota_partition.h @@ -109,12 +109,12 @@ typedef struct ota_ping_pong_partitions_st { } ota_pp_pts_t; typedef union ip_un { - ota_pt_t pts[3]; + ota_pt_t pts[sizeof(ota_ip_pts_t) / sizeof(ota_pt_t)]; ota_ip_pts_t ip_pts; } ip_u; typedef union pp_un { - ota_pt_t pts[4]; + ota_pt_t pts[sizeof(ota_pp_pts_t) / sizeof(ota_pt_t)]; ota_pp_pts_t pp_pts; } pp_u;