From d5869c7810c01eec4f8003ee849f5da332122322 Mon Sep 17 00:00:00 2001 From: BlackLight Date: Tue, 26 Oct 2010 22:07:13 +0200 Subject: [PATCH] (Yes, I will make it sooner or later) --- neural.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neural.c b/neural.c index cd2219d..8427309 100644 --- a/neural.c +++ b/neural.c @@ -216,6 +216,7 @@ __AI_som_train () double **inputs = NULL; char query[1024] = { 0 }; + size_t i = 0, num_rows = 0; @@ -276,7 +277,7 @@ __AI_som_train () { row = (DB_row) DB_fetch_row ( res ); - tuples[i].gid = row[0] ? strtoul ( row[1], NULL, 10 ) : 0; + tuples[i].gid = row[0] ? strtoul ( row[0], NULL, 10 ) : 0; tuples[i].sid = row[1] ? strtoul ( row[1], NULL, 10 ) : 0; tuples[i].rev = row[2] ? strtoul ( row[2], NULL, 10 ) : 0; tuples[i].timestamp = row[3] ? (time_t) strtol ( row[3], NULL, 10 ) : (time_t) 0;