[nemo] Crasher fix
- From: Anders Rune Jensen <arj src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemo] Crasher fix
- Date: Thu, 28 May 2009 18:31:42 -0400 (EDT)
commit cfe5cc0b766dc609bc03c80f03c7a55e679e4750
Author: Anders Rune Jensen <anders iola dk>
Date: Fri May 29 00:24:57 2009 +0200
Crasher fix
---
metadata/MetadataStore.cs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/metadata/MetadataStore.cs b/metadata/MetadataStore.cs
index 878b93e..9e2938b 100644
--- a/metadata/MetadataStore.cs
+++ b/metadata/MetadataStore.cs
@@ -782,7 +782,12 @@ namespace Nemo
for (int i = 0; i < a.Length; ++i)
{
- if (a[i].Equals(b[i])) continue;
+
+ if (i >= b.Length)
+ return -1;
+
+ if (a[i].Equals(b[i]))
+ continue;
bool w = Int32.TryParse(a.Substring(i, 1), out y), x = Int32.TryParse(b.Substring(i, 1), out z);
bool bothNumbers = w && x, bothNotNumbers = !w && !x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]