aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteRegionData.cs
diff options
context:
space:
mode:
authorMelanie2009-10-04 05:49:16 +0100
committerMelanie2009-10-04 05:49:16 +0100
commit6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6 (patch)
tree7e786c0ce436f42a60806629f3249658eab4884a /OpenSim/Data/SQLite/SQLiteRegionData.cs
parentSlightly better message with status code for WebException. (diff)
parentClosing another stream. (diff)
downloadopensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.zip
opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.gz
opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.bz2
opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.xz
Merge branch 'diva-textures-osgrid'
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 1d17bb9..08af7c3 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -581,13 +581,17 @@ namespace OpenSim.Data.SQLite
581 if (row.Read()) 581 if (row.Read())
582 { 582 {
583 // TODO: put this into a function 583 // TODO: put this into a function
584 MemoryStream str = new MemoryStream((byte[]) row["Heightfield"]); 584 using (MemoryStream str = new MemoryStream((byte[])row["Heightfield"]))
585 BinaryReader br = new BinaryReader(str);
586 for (int x = 0; x < (int)Constants.RegionSize; x++)
587 { 585 {
588 for (int y = 0; y < (int)Constants.RegionSize; y++) 586 using (BinaryReader br = new BinaryReader(str))
589 { 587 {
590 terret[x, y] = br.ReadDouble(); 588 for (int x = 0; x < (int)Constants.RegionSize; x++)
589 {
590 for (int y = 0; y < (int)Constants.RegionSize; y++)
591 {
592 terret[x, y] = br.ReadDouble();
593 }
594 }
591 } 595 }
592 } 596 }
593 rev = (int) row["Revision"]; 597 rev = (int) row["Revision"];