Re: a bug in current_functor
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wwaDDiOwXD5hwE=B7-ViE7Kcv66sBDhVkOnOkVrRQhZeg@mail.gmail.com> |
Maybe my 'correction' is invalid, instead current_functor should fail on a predicate with arity 0. Sorry for the noise.... 2013/10/28 Carlo Capelli <[email protected]> > Hi Jan > > There could be a bug at line 391 of pl-funct.c. That line read > > if ( fd && fd->arity > 0 && (!nm || nm == fd->name) ) > > but I think should be > > if ( fd && fd->arity >= 0 && (!nm || nm == fd->name) ) > > This arises from this question<http://stackoverflow.com/q/19642818/874024> > . > > bye Carlo > ** > -------------- next part -------------- HTML attachment scrubbed and removed