mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-08-16 09:31:37 +01:00
Fix off-by-one error in safety check
This commit is contained in:
parent
866dc5b2c0
commit
5509301ba2
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ bot1()
|
|||
char tmp[MAXCO];
|
||||
char *p = tmp;
|
||||
int filledbar = ((uhp() < 0) ? 0 : uhp()) * bar_length / uhpmax();
|
||||
if (filledbar >= MAXCO) { filledbar = MAXCO-1; }
|
||||
if (filledbar >= MAXCO-1) { filledbar = MAXCO-2; }
|
||||
Strcpy(tmp, newbot1);
|
||||
p++;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue