From 8cbdc701dcb6f5e424832cec42eeb3f13b1d4fbb Mon Sep 17 00:00:00 2001 From: mzxrules Date: Thu, 5 Jun 2025 16:04:13 -0400 Subject: [PATCH] cleaner comment --- src/code/graph.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/code/graph.c b/src/code/graph.c index 63c2fdba91..34a0a931d7 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -141,9 +141,12 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) { gfxCtx->overlayBuffer = pool->overlayBuffer; gfxCtx->workBuffer = pool->workBuffer; - //! @bug fbIdx is a signed integer that can overflow into the negatives. When compiled with IDO, the remainder - //! operator will yield -1 for odd negative values of fbIdx (i.e. the same as C99 onwards). + //! @bug fbIdx is a signed integer that can overflow into the negatives. When compiled with a C99+ compiler or IDO, + //! the remainder operator will yield -1 for odd negative values of fbIdx. //! This results in an out of bounds array access in SysCfb_GetFbPtr due to the negative index value. + //! + //! In practice, this isn't issue. In the worst case scenario with the game operating at a consistent 60 FPS, + //! it would take approximately 414.25 days of continuous operation for fbIdx to overflow. gfxCtx->curFrameBuffer = SysCfb_GetFbPtr(gfxCtx->fbIdx % 2); gfxCtx->unk_014 = 0; }