File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,17 @@ typedef union cnc_mcstate_t {
166166 //////
167167 /// @brief Private, do not access.
168168 union {
169- ztd_wchar_t __wide_accumulator [(sizeof (ztd_mbstate_t ) * 2
170- - (sizeof (uint32_t ) + sizeof (void * )))
169+ #define _ZTD_STATE_SIZE \
170+ ((ptrdiff_t)(sizeof(ztd_mbstate_t) * 2) - (ptrdiff_t)(sizeof(uint32_t) + sizeof(void*)))
171+ ztd_wchar_t __wide_accumulator [(_ZTD_STATE_SIZE > (ptrdiff_t )sizeof (ztd_wchar_t )
172+ ? (size_t )_ZTD_STATE_SIZE
173+ : sizeof (ztd_wchar_t ))
171174 / sizeof (ztd_wchar_t )];
172- char __narrow_accumulator [(sizeof (ztd_mbstate_t ) * 2
173- - (sizeof (uint32_t ) + sizeof (void * )))
175+ char __narrow_accumulator [(_ZTD_STATE_SIZE > (ptrdiff_t )sizeof (char )
176+ ? (size_t )_ZTD_STATE_SIZE
177+ : sizeof (char ))
174178 / sizeof (char )];
179+ #undef _ZTD_STATE_SIZE
175180 };
176181 } __win32_code_page ;
177182 //////
You can’t perform that action at this time.
0 commit comments