From: <ag...@us...> - 2011-10-08 21:09:51
|
Revision: 2538 http://zoolib.svn.sourceforge.net/zoolib/?rev=2538&view=rev Author: agreen Date: 2011-10-08 21:09:45 +0000 (Sat, 08 Oct 2011) Log Message: ----------- Fix each, and do possibly dangerous chained call of next cog in repeat. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2011-10-07 21:13:26 UTC (rev 2537) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2011-10-08 21:09:45 UTC (rev 2538) @@ -421,10 +421,10 @@ } else if (sCallValidCogUnchanged(lCog0, iParam)) { - if (sIsTerm(lCog1) || sCallValidCogUnchanged(lCog1, iParam)) +// if (sIsTerm(lCog1) || sCallValidCogUnchanged(lCog1, iParam)) return iSelf; - if (not lCog1) - return lCog0; +// if (not lCog1) +// return lCog0; return spCog_Each(lCog0, lCog1); } else if (not lCog0) @@ -653,7 +653,7 @@ return null; if (sIsTerm(lCog)) - return sCog_While(iCog_Init, iCog_Init); + return sCallCog(sCog_While(iCog_Init, iCog_Init), iParam); //## Dangerous? else return sCog_While(iCog_Init, lCog); } @@ -702,7 +702,7 @@ return sCog_Repeat(iCount, iCog_Init, lCog); if (--iCount) - return sCog_Repeat(iCount, iCog_Init, iCog_Init); + return sCallCog(sCog_Repeat(iCount, iCog_Init, iCog_Init), iParam); //## Dangerous? return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |