On Tuesday, 19 September 2006 at 1:11, Dennis Schridde wrote: > Am Dienstag, 19. September 2006 00:39 schrieb Christian Ohm: > > OK, this might work. Please check before applying, as I might have been > > too tired to get the pointer stuff correct. > I had a quick look at the patch and wondered why you pass a pointer to a > pointer to RETSTACK_TYPE to PopRetStack()
Because I wanted to modify the pointer itself, so I need a pointer to the pointer. > The you set the given pointer to point to a value in the stack. > Is that sane? What if the value gets overwritten for some reason? It's just to get the values that are on the stack at that time, the pointer isn't used later. > And why didn't you just copy the entry like it was done before? Too tired to think straight. > I attached another patch which does it like I would have done it. Thinking about it, I would have done the same. > -BOOL PopRetStack(UDWORD *psVal) > +BOOL PopRetStack(RETSTACK_TYPE *psVal) > { > - if(retStackPos < 0) > + if (retStackPos < 0) > { > debug( LOG_ERROR, "PopRetStack: retStackPos < 0"); > return FALSE; > } > > - *psVal = retStack[retStackPos]; > + *psVal = retStack[retStackPos--]; The only thing I'm not sure about is this. Is the whole struct copied in this case? (I'm too lazy to look it up right now.) -- Love means never having to say you're sorry. -- Eric Segal, "Love Story" That's the most ridiculous thing I've ever heard. -- Ryan O'Neill, "What's Up Doc?" _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev