Skip to content

Commit 8f005d8

Browse files
committed
COMMON: fix LET assignment to map/array field
1 parent 7c268d8 commit 8f005d8

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2015-10-20
2+
Fix LET when assigning a value to a MAP/ARRAY field
3+
14
2015-09-15
25
SDL Update PEN(3) to work more like FLTK
36
Fix display output before PEN

samples/distro-examples/tests/uds.bas

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,28 @@ next i
111111
inner.foo="bar"
112112
m.b << inner
113113
s = " " + m.b(0).foo
114+
115+
rem ------------------------------------
116+
117+
dim bar.x(2), foo(2)
118+
bar.x(0).barx = 1024
119+
foo(0).fooY = 999
120+
if (bar.x(0).barx <> 1024) then
121+
throw "Error 1"
122+
fi
123+
124+
if (foo(0).fooY <> 999) then
125+
throw "Error 2"
126+
fi
127+
128+
if (1024 <> bar.x(0).barx) then
129+
throw "Error 3"
130+
fi
131+
132+
if (999 <> foo(0).fooY) then
133+
throw "Error 4"
134+
fi
135+
136+
bar.x(1).barx=bar.x(0).barx+976
137+
bar.x(1).barx/=1000
138+
if bar.x(1).barx <> 2 then throw "Yuck, I can't read red print on black background."

src/common/scan.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,9 @@ char *comp_array_params(char *src, char exitChar) {
17011701
}
17021702
break;
17031703
};
1704-
p++;
1704+
if (*p != exitChar) {
1705+
p++;
1706+
}
17051707
if (*p == exitChar) {
17061708
p++;
17071709
break;

0 commit comments

Comments
 (0)