From 5c2397e50465e72bfd3403767bfc059782c21c3b Mon Sep 17 00:00:00 2001
From: Jesper Andersson <jesper@fmrib.ox.ac.uk>
Date: Wed, 6 Feb 2013 17:13:39 +0000
Subject: [PATCH] Fixed bug in Row() method of ColumnIterator

---
 SpMat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SpMat.h b/SpMat.h
index 72da5f1..682897f 100644
--- a/SpMat.h
+++ b/SpMat.h
@@ -164,7 +164,7 @@ public:
     }
     ~ColumnIterator() {}
     T operator*() const { return(*_val_it); }
-    unsigned int Row() const { return(*_ri_it); }
+    unsigned int Row() const { return((*_ri_it)+1); }
     bool operator==(const ColumnIterator& rhs) const { return(_val_it == rhs._val_it); }
     bool operator!=(const ColumnIterator& rhs) const { return(!(*this == rhs)); }
     // Prefix increment. Use whenever possible
-- 
GitLab