libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 5a840ed017a7e57d4344d021126efd75b41b7866
parent 3708c6237d40b1ac7fe744ecc33eefdd8021a231
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 24 Sep 2020 10:14:46 +0200

Fix an off by one in the {back,fore}ground color value checks.

Diffstat:
Msrc/loaders/pcboard.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c @@ -129,8 +129,8 @@ ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options) loop += 3; } - if (background > PCB_COLORS || - foreground > PCB_COLORS) { + if (background >= PCB_COLORS || + foreground >= PCB_COLORS) { ctx->error = ANSILOVE_FORMAT_ERROR; goto error; }