aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-gr.y
diff options
context:
space:
mode:
Diffstat (limited to 'engines/director/lingo/lingo-gr.y')
-rw-r--r--engines/director/lingo/lingo-gr.y16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 8eb7913ac1..0e3f728f5b 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -312,16 +312,16 @@ ifstmt: if cond thennl stmtlist end ENDCLAUSE {
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
g_lingo->processIf(0, $9 - $1); }
- | if cond tTHEN begin stmtoneliner end {
+ | if cond tTHEN begin stmtoneliner end elseifstmtoneliner end elsestmtoneliner end {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $4 - $1);
- WRITE_UINT32(&else1, 0);
- WRITE_UINT32(&end, $6 - $1);
+ WRITE_UINT32(&else1, $6 - $1);
+ WRITE_UINT32(&end, $10 - $1);
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
- g_lingo->processIf(0, 0); }
+ g_lingo->processIf(0, $10 - $1); }
| if cond tTHEN begin stmtoneliner end nlelse begin stmtoneliner end {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $4 - $1);
@@ -332,16 +332,16 @@ ifstmt: if cond thennl stmtlist end ENDCLAUSE {
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
g_lingo->processIf(0, 0); }
- | if cond tTHEN begin stmtoneliner end elseifstmtoneliner end elsestmtoneliner end {
+ | if cond tTHEN begin stmtoneliner end {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $4 - $1);
- WRITE_UINT32(&else1, $6 - $1);
- WRITE_UINT32(&end, $10 - $1);
+ WRITE_UINT32(&else1, 0);
+ WRITE_UINT32(&end, $6 - $1);
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
- g_lingo->processIf(0, $10 - $1); }
+ g_lingo->processIf(0, 0); }
;
elsestmtoneliner: /* nothing */ { $$ = 0; }