From 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Tue, 4 Feb 2025 23:39:24 +0100 Subject: add error handling to ui --- lib/nes/app/graphics/renderer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/nes/app/graphics/renderer.cc') diff --git a/lib/nes/app/graphics/renderer.cc b/lib/nes/app/graphics/renderer.cc index 6429a52..d512e71 100644 --- a/lib/nes/app/graphics/renderer.cc +++ b/lib/nes/app/graphics/renderer.cc @@ -129,7 +129,7 @@ namespace nes::app i32 const x, i32 const y, u32 const width, u32 const height, color const c) -> void { if (c == color::transparent) { return; } - if (x >= static_cast(width) || y >= static_cast(height)) { return; } + if (x >= static_cast(renderer::width) || y >= static_cast(renderer::height)) { return; } auto const resolved = resolve_color(c); auto const x_stop = std::min(x + static_cast(width), static_cast(renderer::width)); -- cgit v1.3.1