fix too small array in XGI_CRT1TableStruct

> ../../src/init.c:553:13: warning: array index 16 is past the end of the array (which contains 15 elements) [-Warray-bounds]
>      temp = XGI_Pr->XGINEWUB_CRT1Table[index].CR[16] & 0xE0;
>             ^                                    ~~
> ../../src/vb_struct.h:377:3: note: array 'CR' declared here
>   UCHAR CR[15];
>   ^
> ../../src/init.c:556:15: warning: array index 16 is past the end of the array (which contains 15 elements) [-Warray-bounds]
>      temp = ((XGI_Pr->XGINEWUB_CRT1Table[index].CR[16]) & 0x01) << 5;
>               ^                                    ~~
> ../../src/vb_struct.h:377:3: note: array 'CR' declared here
>   UCHAR CR[15];
>   ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-xgi/-/merge_requests/9>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-06-06 11:15:35 +02:00
parent 6f881371d3
commit 6e5981dafa

View File

@@ -374,7 +374,7 @@ typedef struct _XGI21_LVDSCapStruct
typedef struct _XGI_CRT1TableStruct
{
UCHAR CR[15];
UCHAR CR[16];
} XGI_CRT1TableStruct;