From 0f5e37553a915792f434a72b05bf93f09aab318d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 16 Sep 2010 00:47:07 +0000 Subject: [PATCH] [GB.DB] * BUG: Table.Indexes.Add() now does not corrupt index fields anymore. git-svn-id: svn://localhost/gambas/trunk@3222 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/lib/db/CIndex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/lib/db/CIndex.c b/main/lib/db/CIndex.c index 1a35fbf1d..63647cfa9 100644 --- a/main/lib/db/CIndex.c +++ b/main/lib/db/CIndex.c @@ -234,10 +234,12 @@ BEGIN_METHOD(CINDEX_add, GB_STRING name; GB_OBJECT fields; GB_BOOLEAN unique) q_add(table->driver->GetQuote()); } - info.fields = q_get(); + info.fields = q_steal(); info.unique = VARGOPT(unique, FALSE); table->driver->Index.Create(&table->conn->db, table->name, name, &info); + + GB.FreeString(&info.fields); END_METHOD