From e6e2a137e9535fa5b1d57c706a7742bad735e9f1 Mon Sep 17 00:00:00 2001 From: smf- Date: Wed, 18 May 2022 19:15:39 +0100 Subject: [PATCH] Always initialize upd3301 attr_extend_info, as the loop isn't guaranteed to set all entries. I don't know what real hardware would do, but it triggered a compiler warning. [smf] --- src/devices/video/upd3301.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/devices/video/upd3301.cpp b/src/devices/video/upd3301.cpp index ffad84cca76..3e40384e387 100644 --- a/src/devices/video/upd3301.cpp +++ b/src/devices/video/upd3301.cpp @@ -604,15 +604,11 @@ int upd3301_device::vrtc_r() UPD3301_FETCH_ATTRIBUTE( upd3301_device::default_attr_fetch ) { const u8 attr_max_size = 80; - std::array attr_extend_info; + std::array attr_extend_info = {0}; // elthlead (pc8801) uses b&w no attributes/no special control mode - // 0-fill buffer seems enough if (m_gfx_mode == 1) - { - std::fill(attr_extend_info.begin(), attr_extend_info.end(), 0x00); return attr_extend_info; - } // TODO: may actually fetch in LIFO order // Some edge cases in pc8801 N88 Basic (status on bottom), jettermi and play6lim backs up this theory.