diff options
author | root <root@rshg054.dnsready.net> | 2012-04-26 00:01:31 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-04-26 00:01:31 +0000 |
commit | 00e1a2f0886e471d594c22dc14fc9d80ce5098c4 (patch) | |
tree | b8c721e8b8050ead04f92a5051e4bee881defa9b /community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch | |
parent | 98bf2ac3fdd6f7bcb6ce45c932fc13c07fecc03f (diff) |
Thu Apr 26 00:01:31 UTC 2012
Diffstat (limited to 'community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch')
-rw-r--r-- | community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch b/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch new file mode 100644 index 000000000..0b6e68df3 --- /dev/null +++ b/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch @@ -0,0 +1,35 @@ +--- gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:01:54 3864 ++++ gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:26:41 3865 +@@ -1216,7 +1216,8 @@ + GB.StoreVariant(&fantom, &buffer[i]); + } + else{ +- GB.StoreVariant(&res->GetData(pos,i), &buffer[i]); ++ GB_VARIANT val = res->GetData(pos,i); ++ GB.StoreVariant(&val , &buffer[i]); + } + } + } +@@ -1874,6 +1875,8 @@ + static char query[SQLMAXLEN]; + int type; + std::string str1,str2; ++ GB_VARIANT varval; ++ char* charval; + 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 @@ + 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); ++ charval = res->GetData(0,3).value.value._string; ++ GB.FreeString(&charval); + res->SetData(0,3,str2); +- GB.StoreVariant(&res->GetData(0,3), &info->def); ++ varval = res->GetData(0,3); ++ GB.StoreVariant(&varval, &info->def); + } + delete res; + return FALSE; |