All pastes #2108339 Raw Edit

--- trunk/OpenSimSearch/Modules/

public text v1 · immutable
#2108339 ·published 2012-01-31 22:36 UTC
rendered paste body
--- trunk/OpenSimSearch/Modules/SearchModule/OpenSearch.cs      2012-01-31 05:45:38.000000000 -0800
+++ trunk/OpenSimSearch/Modules/SearchModule/OpenSearch.cs      2012-01-31 13:26:37.000000000 -0800
@@ -618,8 +618,10 @@
                 {
                     Hashtable d = (Hashtable)o;

-                    if (d["name"] == null)
+                    if (d["name"] == null) {
+                        count--;
                         continue;
+                    }

                     Landdata[i] = new DirLandReplyData();
                     Landdata[i].parcelID = new UUID(d["parcel_id"].ToString());
@@ -642,6 +644,9 @@
                 i = 0;
                 foreach (DirLandReplyData landDir in Landdata)
                 {
+                    if (i >= count)
+                        break;
+
                     foreach (Scene scene in m_Scenes)
                     {
                         if (scene.RegionInfo.RegionID.ToString() == ParcelRegionUUID[i])
@@ -651,6 +656,7 @@
                             break;
                         }
                     }
+
                     string[] landingpoint = ParcelLandingPoint[i].Split('/');
                     mapItemReply mapitem = new mapItemReply();
                     mapitem.x = (uint)((locX * 256) + Convert.ToDecimal(landingpoint[0]));
@@ -662,6 +668,7 @@
                     mapitems.Add(mapitem);
                     i++;
                 }
+
                 remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags);
                 mapitems.Clear();
             }
@@ -719,8 +726,10 @@
                 {
                     Hashtable d = (Hashtable)o;

-                    if (d["name"] == null)
+                    if (d["name"] == null) {
+                        count--;
                         continue;
+                    }

                     Eventsdata[i] = new DirEventsReplyData();
                     Eventsdata[i].ownerID = new UUID(d["owner_id"].ToString());
@@ -744,6 +753,9 @@

                 foreach (DirEventsReplyData Eventdata in Eventsdata)
                 {
+                    if (i >= count)
+                        break;
+
                     foreach (Scene scene in m_Scenes)
                     {
                         if (scene.RegionInfo.RegionID.ToString() == ParcelRegionUUID[i])