ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit fba18547bf93d4cfcb8617f470f9a8ee117ce9b7
parent eee0059e388ae7bbe87b560205d633ef79ebdda0
Author: ByteProject <stefan.vogt@byteproject.net>
Date:   Sat, 31 Mar 2012 08:45:16 +0200

ANSi escape sequence NUL bug fix

Our substr() implementation stopped when reaching NUL which is the way
it should be. We now know there are (not common) .ans files that encode
spaces as NUL instead of space. Obviously this seems to be conform, so
said files render correctly now.

Diffstat:
Mansilove/substr.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ansilove/substr.c b/ansilove/substr.c @@ -18,7 +18,7 @@ char *substr(char *str, size_t begin, size_t len) { - if (str == 0 || strlen(str) == 0 || strlen(str) < begin || strlen(str) < (begin+len)) + if (str == 0 || strlen(str) == 0) return 0; return strndup(str + begin, len);