Index: libcfa/src/algorithms/range_iterator.cfa
===================================================================
--- libcfa/src/algorithms/range_iterator.cfa	(revision 58b2638c3336891719488015a8b46015e19d89d6)
+++ libcfa/src/algorithms/range_iterator.cfa	(revision 8e6582413cf8b4afa976cac5c741ea047e2fbe90)
@@ -59,3 +59,4 @@
 		if(this.text[0] == '\0') break;
 	}
+	this.com = -1;
 }
Index: libcfa/src/algorithms/range_iterator.hfa
===================================================================
--- libcfa/src/algorithms/range_iterator.hfa	(revision 58b2638c3336891719488015a8b46015e19d89d6)
+++ libcfa/src/algorithms/range_iterator.hfa	(revision 8e6582413cf8b4afa976cac5c741ea047e2fbe90)
@@ -25,3 +25,3 @@
 }
 
-static inline bool moveNext(RangeIter & this) { resume(this); return this.com > 0; }
+static inline bool moveNext(RangeIter & this) { resume(this); return this.com >= 0; }
Index: tests/algorithms/.expect/range_test.txt
===================================================================
--- tests/algorithms/.expect/range_test.txt	(revision 8e6582413cf8b4afa976cac5c741ea047e2fbe90)
+++ tests/algorithms/.expect/range_test.txt	(revision 8e6582413cf8b4afa976cac5c741ea047e2fbe90)
@@ -0,0 +1,1 @@
+0 1 2 3 4 5 6
Index: tests/algorithms/range_test.cfa
===================================================================
--- tests/algorithms/range_test.cfa	(revision 8e6582413cf8b4afa976cac5c741ea047e2fbe90)
+++ tests/algorithms/range_test.cfa	(revision 8e6582413cf8b4afa976cac5c741ea047e2fbe90)
@@ -0,0 +1,27 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// range_test.cfa --
+//
+// Author           : Thierry Delisle
+// Created On       : Thu Dec 02 17:13:24 2021
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include <fstream.hfa>
+#include <algorithms/range_iterator.hfa>
+
+int main() {
+	{
+		RangeIter r = { "0-6" };
+		while(moveNext(r)) {
+			sout | r.com | nonl;
+		}
+		sout | nl;
+	}
+}
