[Scummvm-devel] Two new bugs :-)
David Given
dg at tao-group.com
Mon Dec 3 03:28:08 CET 2001
On Sunday 02 December 2001 19:26, you wrote:
[...]
> case 119:/* load fl object */
> loadFlObject(pop(), (_features & GF_HAS_ROOMTABLE) ? -1 : pop());
> break;
>
> What we have here are two function calls with 'side effects' (pop) on the
> same line in a function call.
IIRC, ',' is a sequence point and enforces the ordering of execution. OTOH,
that may just be the ',' operator.
[...]
> And on my iPAQ (ARM GCC), it fails as it seems to
> first run the left 'pop' and then the right one.
Yuk.
[...]
> case 119:/* load fl object */
> {
> int arg2 = (_features & GF_HAS_ROOMTABLE) ? -1 : pop();
> int arg1 = pop();
> loadFlObject(arg1, arg2);
> }
> break;
I'd be inclined to go for this anyway, as it's rather clearer. (In fact, if
it was me, I'd put in an explicit 'if'.)
BTW, loadFlObject() seems to be unimplemented; _Sam & Max_ complains a lot
and doesn't work.
--
+- David Given --------McQ-+ "There are two major products that come out of
| Work: dg at tao-group.com | Berkeley: LSD and Unix. We don't believe this to
| Play: dg at cowlark.com | be a coincidence." --- Jeremy S. Anderson
+- http://www.cowlark.com -+
More information about the Scummvm-devel
mailing list