From 98f1af353ee4a29f0b180d47aeb5d9c4110aa6e7 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 4 Jan 2005 12:08:56 +0000 Subject: [PATCH] * s/autodetecting/autodetected/ * minor cosmetic fix. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@408 92316355-f0b4-4df1-b90c-862c8a59935f --- src/main.c | 6 +++--- src/phpbb.c | 3 +-- src/slashdot.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main.c b/src/main.c index beebc0c..47d23ca 100644 --- a/src/main.c +++ b/src/main.c @@ -134,18 +134,18 @@ int main(int argc, char *argv[]) { if(img->width == 320 && img->height == 50) { - dprintf("autodetecting phpBB captcha\n"); + dprintf("autodetected phpBB captcha\n"); result = decode_phpbb(img); } else if((img->height == 25 || img->height == 30) && count < 10) { - dprintf("autodetecting scode captcha\n"); + dprintf("autodetected scode captcha\n"); result = decode_scode(img); } else if(img->height == 69) { - dprintf("autodetecting slashdot captcha\n"); + dprintf("autodetected slashdot captcha\n"); result = decode_slashdot(img); } else diff --git a/src/phpbb.c b/src/phpbb.c index 6f9bca3..a4c8043 100644 --- a/src/phpbb.c +++ b/src/phpbb.c @@ -37,6 +37,7 @@ char *decode_phpbb(struct image *img) /* phpBB captchas have 6 characters */ result = malloc(7 * sizeof(char)); + strcpy(result, " "); if(!font) { @@ -58,8 +59,6 @@ char *decode_phpbb(struct image *img) setpixel(tmp3, x, y, 255, g, 255); } - strcpy(result, " "); - for(cur = 0; cur < 6; cur++) { /* Try to find 1st letter */ diff --git a/src/slashdot.c b/src/slashdot.c index a377139..1129033 100644 --- a/src/slashdot.c +++ b/src/slashdot.c @@ -45,6 +45,7 @@ char *decode_slashdot(struct image *img) /* Slashdot captchas have 7 characters */ result = malloc(8 * sizeof(char)); + strcpy(result, " "); /* Clean image a bit */ tmp1 = filter_detect_lines(img); @@ -256,8 +257,6 @@ static struct image *find_glyphs(struct image *img) setpixel(dst, x, y, 255, g, 255); } - strcpy(result, " "); - for(x = 0; x < font->width; x++) { int found = 0;