Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit a1df3a8

Browse files
committed
[Bug 1751] Allow more flexible parsing: 'flip the selobj ..', 'flip last img..' etc
1 parent 01a625a commit a1df3a8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

engine/src/cmdsc.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,17 +1330,17 @@ Parse_stat MCFlip::parse(MCScriptPoint &sp)
13301330
Symbol_type type;
13311331
const LT *te;
13321332
initpoint(sp);
1333-
if (sp.skip_token(SP_FACTOR, TT_CHUNK, CT_IMAGE) == PS_NORMAL)
1333+
1334+
// PM-2015-08-07: [[ Bug 1751 ]] Allow more flexible parsing: 'flip the selobj ..', 'flip last img..' etc
1335+
1336+
// Parse an arbitrary chunk. If it does not resolve as an image, a runtime error will occur in MCFlip::exec
1337+
image = new MCChunk(False);
1338+
if (image->parse(sp, False) != PS_NORMAL)
13341339
{
1335-
sp.backup();
1336-
image = new MCChunk(False);
1337-
if (image->parse(sp, False) != PS_NORMAL)
1338-
{
1339-
MCperror->add
1340-
(PE_FLIP_BADIMAGE, sp);
1341-
return PS_ERROR;
1342-
}
1340+
MCperror->add(PE_FLIP_BADIMAGE, sp);
1341+
return PS_ERROR;
13431342
}
1343+
13441344
if (sp.next(type) != PS_NORMAL || sp.lookup(SP_FLIP, te) != PS_NORMAL)
13451345
{
13461346
MCperror->add

0 commit comments

Comments
 (0)