範囲外の書き込み。 オーバーランエラーです。
> #define FLOORSNUMBER 128
> #define ILAFLOORSNUMBER 40
> #else
> #define ILAFLOORSNUMBER 40
>
> uint8 downCallSide[ILAFLOORSNUMBER]; extern uint16
> callLightTimerAside[FLOORSNUMBER]; extern uint16
> callLightTimerBside[FLOORSNUMBER];
for(i = 0;i <= FLOORSNUMBER;i++)
{
**CID 18019 (#1 of 3): Out-of-bounds write (OVERRUN)
overrun-local: Overrunning array ilaByPass.downCallSide of 40 bytes at byte offset 128 using index i (which evaluates to 128)**
ilaByPass.downCallSide[i] = OFFSTATE;
#ifndef NA
**CID 17746 (#1 of 3): Out-of-bounds write (OVERRUN)**
**overrun-local: Overrunning array callLightTimerAside of 128 2-byte elements at element index 128 (byte offset 257) using index i (which evaluates to 128).**
callLightTimerAside[i] = OFFSTATE;
i の値が 128 になり、downcallside のサイズが 40 しかないため、downcallside[i] を実行しようとするとオーバーランが発生することを理解しています。どうすれば解決できますか?
と
callLightTimerAside[i] の場合、サイズはフロア番号と同じように見えますが、まだオーバーランがあります。