Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > cc7504192caa1128e0632465d6679b91 > files > 1

gambas2-2.23.0-1.fc13.1.src.rpm

--- gambas2-2.22.0/gb.db.firebird/src/main.cpp	2010-11-23 22:42:03.000000000 +0100
+++ gambas2-2.22.0/gb.db.firebird/src/main.cpp	2011-03-16 12:30:42.000000000 +0100
@@ -1216,7 +1216,8 @@ static int query_fill(DB_DATABASE *db, D
         GB.StoreVariant(&fantom, &buffer[i]);
       }
       else{
-        GB.StoreVariant(&res->GetData(pos,i), &buffer[i]);
+        fantom = res->GetData(pos,i);
+        GB.StoreVariant(&fantom, &buffer[i]);
       }
     }
   }
@@ -1874,6 +1875,8 @@ static int field_info(DB_DATABASE *db, c
   static char query[SQLMAXLEN];
   int type;
   std::string str1,str2;
+  GB_VARIANT value;
+
   snprintf(query,SQLMAXLEN-1,"select b.RDB$field_name,a.RDB$field_type,b.rdb$null_flag,b.rdb$default_source,a.RDB$field_length from RDB$fields a,RDB$relation_fields b where a.RDB$field_name=b.RDB$field_source and b.RDB$relation_name=upper('%s') and b.rdb$field_name=upper('%s')",table,field);
   if (do_query(db, query, &res, "Unable to get the field from the table")){
     delete res;
@@ -1900,9 +1903,11 @@ static int field_info(DB_DATABASE *db, c
     str1=res->GetData(0,3).value.value._string;
   if(str1!="")
     str2=str1.assign(str1,8,str1.length()-8);
-  GB.FreeString(&res->GetData(0,3).value.value._string);
+  value = res->GetData(0,3);
+  GB.FreeString(&value.value.value._string);
   res->SetData(0,3,str2);
-  GB.StoreVariant(&res->GetData(0,3), &info->def);
+  value = res->GetData(0,3);
+  GB.StoreVariant(&value, &info->def);
   }
   delete res;
   return FALSE;