prevent overflow in win_bar

This commit is contained in:
smayzy 2026-04-27 13:47:20 +02:00
parent ed41a14d36
commit b4b748c042

View File

@ -345,6 +345,8 @@ void win_bar(StInt *st, bool use_color) {
int yellow = (75 * bar_width) / 100;
int red = (90 * bar_width) / 100;
if (filled > bar_width) filled = bar_width;
for (int y = 1; y <= bar_height; y++) {
for (int x = 0; x < filled; x++) {
if (use_color) {