lib/func.tcl, test/unit: Fix spin in `next-matching-date' and test.
[ca] / lib / func.tcl
index 1f73008..a3b58dc 100644 (file)
@@ -326,7 +326,7 @@ proc next-matching-date* {pat refvar i} {
       {^\d+$} {
        ## A numeric literal.  If it's within bounds then set it; otherwise
        ## we'll have to start from the beginning.
-       if {$p < $n || $p > $max} { return step }
+       if {$p < $nn || $p > $max} { return step }
        set nn $p
       }