ansilove

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

commit 240bb3fb61de32d6afeee572ed7db64cdfd55746
parent 85011355f14559cf1d09f939c8a500511af13eb6
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 28 Jun 2017 19:13:48 +0200

Initialize values correctly when declaring them

Diffstat:
Msrc/loaders/tundra.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/loaders/tundra.c b/src/loaders/tundra.c @@ -37,9 +37,7 @@ void tundra(unsigned char *inputFileBuffer, int32_t inputFileSize, char *outputF // read tundra file a first time to find the image size int32_t character, background = 0, foreground = 0; - int32_t loop = 0, column = 0, row = 0; - - loop=9; + int32_t loop = 9, column = 0, row = 1; while (loop < inputFileSize) { @@ -92,7 +90,6 @@ void tundra(unsigned char *inputFileBuffer, int32_t inputFileSize, char *outputF loop++; } - row++; // allocate buffer image memory canvas = gdImageCreateTrueColor(columns * bits , (row) * fontData.height);