aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/game/game.c2
-rw-r--r--plugins/healthbar/healthbar.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/game/game.c b/plugins/game/game.c
index bd93419..ea6a665 100644
--- a/plugins/game/game.c
+++ b/plugins/game/game.c
@@ -369,7 +369,7 @@ static void render_map(struct winsize ws)
printf(" ");
}
- for (int i = 0; i < rows_left + 1; i++)
+ for (int i = 0; i < rows_left; i++)
for (int i = 0; i < ws.ws_col; i++)
printf(" ");
}
diff --git a/plugins/healthbar/healthbar.c b/plugins/healthbar/healthbar.c
index 5651051..c66d3f1 100644
--- a/plugins/healthbar/healthbar.c
+++ b/plugins/healthbar/healthbar.c
@@ -7,7 +7,7 @@ static struct color gray;
static void render_healthbar(struct winsize ws)
{
int y = max(ws.ws_row - 2, 0);
- int x = max(ws.ws_col / 2 - player.max_health, 0);
+ int x = max(ws.ws_col / 2 - player.max_health / 2, 0);
printf("\e[%u;%uH", y, x);