Update of /cvsroot/webmacro/webmacro/src/org/webmacro/directive
In directory usw-pr-cvs1:/tmp/cvs-serv27188/src/org/webmacro/directive
Modified Files:
CountDirective.java
Log Message:
I must have just learned to program yesterday. fix the #count directive to count correctly.
Index: CountDirective.java
===================================================================
RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/directive/CountDirective.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CountDirective.java 22 Oct 2002 15:23:17 -0000 1.1
--- CountDirective.java 25 Oct 2002 01:41:05 -0000 1.2
***************
*** 131,145 ****
}
- // negate the step, if necessary
- if ((start > end && step > 0) || (start < end && step < 0))
- step = -step;
-
// just do it
! for (; ; start+=step) {
_iterator.setValue(context, new Integer(start));
_body.write(out, context);
-
- if (start==end)
- break;
}
}
--- 131,138 ----
}
// just do it
! for (; start<=end; start+=step) {
_iterator.setValue(context, new Integer(start));
_body.write(out, context);
}
}
|