diff options
author | Yves Combe <ycombe@src.gnome.org> | 2005-08-24 20:52:43 (GMT) |
---|---|---|
committer | Yves Combe <ycombe@src.gnome.org> | 2005-08-24 20:52:43 (GMT) |
commit | 1ba93a4068a9e187d01278c93528da0e98cde9e7 (patch) | |
tree | 5d6144cd49b9535851b63b90106eef4de115d67c /src | |
parent | 9971235da42c9fc9378162915b8cecfd02b468cc (diff) |
fix segfault
Diffstat (limited to 'src')
-rw-r--r-- | src/gcompris/gcompris_db.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gcompris/gcompris_db.c b/src/gcompris/gcompris_db.c index eb6f44c..6f82eeb 100644 --- a/src/gcompris/gcompris_db.c +++ b/src/gcompris/gcompris_db.c @@ -1,6 +1,6 @@ /* gcompris - gcompris_db.c * - * Time-stamp: <2005/08/24 21:09:54 yves> + * Time-stamp: <2005/08/24 22:33:31 yves> * * Copyright (C) 2000 Bruno Coudoin * @@ -1286,18 +1286,21 @@ GHashTable *gcompris_get_conf_with_table(int profile_id, int board_id, GHashTabl i = ncolumn; - g_warning("key == %s -- value == %s ", result[0], result[1]); + if (i == 2) + g_warning(" i %d key == %s -- value == %s ", i, result[0], result[1]); + else + g_warning("Request returned %d column(s) !", i); while (i < (nrow +1)*ncolumn){ if (strcmp(result[i+1],"NULL")!=0){ /* "NULL" values are ignored */ g_hash_table_replace (hash_conf, - g_strdup(result[i++]), - g_strdup(result[i++])); - i -=2; + g_strdup(result[i]), + g_strdup(result[i+1])); + g_warning("get_conf: put key %s, value %s in the hash", - g_strdup(result[i++]), - g_strdup(result[i++])); + result[i++], + result[i++]); } else i += 2; |