diff options
author | withmorten <morten.with@gmail.com> | 2021-01-25 14:06:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 14:06:53 +0100 |
commit | 9d4053419b213a37e34f39a903b1226c9a6909d1 (patch) | |
tree | e18ceeaef321e70bbd8d0f8d3aa7a9a7a4deb7ff /src/control/OnscreenTimer.cpp | |
parent | modelinfo and visibility plg fixes (diff) | |
parent | make building with Codewarrior 7 possible (diff) | |
download | re3-9d4053419b213a37e34f39a903b1226c9a6909d1.tar re3-9d4053419b213a37e34f39a903b1226c9a6909d1.tar.gz re3-9d4053419b213a37e34f39a903b1226c9a6909d1.tar.bz2 re3-9d4053419b213a37e34f39a903b1226c9a6909d1.tar.lz re3-9d4053419b213a37e34f39a903b1226c9a6909d1.tar.xz re3-9d4053419b213a37e34f39a903b1226c9a6909d1.tar.zst re3-9d4053419b213a37e34f39a903b1226c9a6909d1.zip |
Diffstat (limited to 'src/control/OnscreenTimer.cpp')
-rw-r--r-- | src/control/OnscreenTimer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/OnscreenTimer.cpp b/src/control/OnscreenTimer.cpp index 08e6fa3f..53ed14c7 100644 --- a/src/control/OnscreenTimer.cpp +++ b/src/control/OnscreenTimer.cpp @@ -14,7 +14,7 @@ void COnscreenTimer::Init() { for(uint32 i = 0; i < NUMONSCREENCOUNTERS; i++) { m_sCounters[i].m_nCounterOffset = 0; - for(uint32 j = 0; j < ARRAY_SIZE(COnscreenCounterEntry::m_aCounterText); j++) { + for(uint32 j = 0; j < ARRAY_SIZE(m_sCounters[0].m_aCounterText); j++) { m_sCounters[i].m_aCounterText[j] = 0; } @@ -24,7 +24,7 @@ void COnscreenTimer::Init() { for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) { m_sClocks[i].m_nClockOffset = 0; - for(uint32 j = 0; j < ARRAY_SIZE(COnscreenTimerEntry::m_aClockText); j++) { + for(uint32 j = 0; j < ARRAY_SIZE(m_sClocks[0].m_aClockText); j++) { m_sClocks[i].m_aClockText[j] = 0; } @@ -92,7 +92,7 @@ void COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text, uint16 p m_sCounters[pos].m_nCounterOffset = offset; if(text) { - strncpy(m_sCounters[pos].m_aCounterText, text, ARRAY_SIZE(COnscreenCounterEntry::m_aCounterText)); + strncpy(m_sCounters[pos].m_aCounterText, text, ARRAY_SIZE(m_sCounters[0].m_aCounterText)); } else { m_sCounters[pos].m_aCounterText[0] = 0; } @@ -114,7 +114,7 @@ void COnscreenTimer::AddClock(uint32 offset, char* text, bool bGoingDown) { m_sClocks[i].m_nClockOffset = offset; m_sClocks[i].m_bClockGoingDown = bGoingDown; if(text) { - strncpy(m_sClocks[i].m_aClockText, text, ARRAY_SIZE(COnscreenTimerEntry::m_aClockText)); + strncpy(m_sClocks[i].m_aClockText, text, ARRAY_SIZE(m_sClocks[0].m_aClockText)); } else { m_sClocks[i].m_aClockText[0] = 0; } |