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

Commit 36c45a2

Browse files
author
livecodeali
committed
[[ Bug 17112 ]] Ensure chunks are restricted to range when required
1 parent 015564d commit 36c45a2

5 files changed

Lines changed: 74 additions & 98 deletions

File tree

docs/notes/bugfix-17112.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure chunks are restricted to range when required

engine/src/exec-strings-chunk.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ struct MCChunkCountState
5757
MCStringRef string;
5858
Chunk_term chunk;
5959
MCExecContext *ctxt;
60-
MCRange *range;
6160
};
6261

6362
// AL-2015-02-10: [[ Bug 14532 ]] Allow chunks to be counted in a given range, to prevent substring copying in text chunk resolution.
@@ -97,12 +96,12 @@ void MCStringsCountChunks(MCExecContext& ctxt, Chunk_term p_chunk_type, MCString
9796
MCStringsCountChunksInRange(ctxt, p_chunk_type, p_string, MCRangeMake(0, MCStringGetLength(p_string)), r_count);
9897
}
9998

100-
uinteger_t MCStringsCountChunkCallback(void *context)
99+
uinteger_t MCStringsCountChunkCallback(void *context, MCRange *p_range)
101100
{
102101
MCChunkCountState *t_state = static_cast<MCChunkCountState *>(context);
103102
uinteger_t t_count;
104-
if (t_state -> range != nil)
105-
MCStringsCountChunksInRange(*t_state -> ctxt, t_state -> chunk, t_state -> string, *t_state -> range, t_count);
103+
if (p_range != nil)
104+
MCStringsCountChunksInRange(*t_state -> ctxt, t_state -> chunk, t_state -> string, *p_range, t_count);
106105
else
107106
MCStringsCountChunks(*t_state -> ctxt, t_state -> chunk, t_state -> string, t_count);
108107
return t_count;
@@ -185,8 +184,7 @@ void MCStringsGetExtentsByRangeInRange(MCExecContext& ctxt, Chunk_term p_chunk_t
185184
t_state . string = (MCStringRef)p_string;
186185
t_state . chunk = p_chunk_type;
187186
t_state . ctxt = &ctxt;
188-
t_state . range = p_range;
189-
MCChunkGetExtentsByRangeInRange(false, false, false, p_first, p_last, MCStringsCountChunkCallback, &t_state, r_first, r_chunk_count);
187+
MCChunkGetExtentsByRangeInRange(false, false, false, p_first, p_last, MCStringsCountChunkCallback, &t_state, p_range, r_first, r_chunk_count);
190188
}
191189
}
192190

@@ -203,8 +201,7 @@ void MCStringsGetExtentsByExpressionInRange(MCExecContext& ctxt, Chunk_term p_ch
203201
t_state . string = (MCStringRef)p_string;
204202
t_state . chunk = p_chunk_type;
205203
t_state . ctxt = &ctxt;
206-
t_state . range = p_range;
207-
MCChunkGetExtentsByExpressionInRange(false, false, false, p_first, MCStringsCountChunkCallback, &t_state, r_first, r_chunk_count);
204+
MCChunkGetExtentsByExpressionInRange(false, false, false, p_first, MCStringsCountChunkCallback, &t_state, p_range, r_first, r_chunk_count);
208205
}
209206
}
210207

libfoundation/include/foundation-chunk.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,15 @@ enum MCChunkType
3636
kMCChunkTypeByte,
3737
};
3838

39-
struct MCChunkCountInRangeState
40-
{
41-
MCValueRef value;
42-
MCRange *range;
43-
};
44-
45-
typedef uinteger_t (MCChunkCountCallback(void *context));
39+
typedef uinteger_t (MCChunkCountCallback(void *context, MCRange *range));
4640

47-
uinteger_t MCChunkCountByteChunkCallback(void *context);
48-
uinteger_t MCChunkCountCodepointChunkCallback(void *context);
41+
uinteger_t MCChunkCountByteChunkCallback(void *context, MCRange *range);
42+
uinteger_t MCChunkCountCodepointChunkCallback(void *context, MCRange *range);
4943

5044
uindex_t MCChunkCountChunkChunksInRange(MCStringRef p_string, MCStringRef p_delimiter, MCStringOptions p_options, MCRange *p_range);
5145

52-
bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, integer_t p_last, MCChunkCountCallback p_callback, void *p_context, uindex_t& r_first, uindex_t& r_chunk_count);
53-
bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, MCChunkCountCallback p_callback, void *p_context, uindex_t& r_first, uindex_t& r_chunk_count);
46+
bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, integer_t p_last, MCChunkCountCallback p_callback, void *p_context, MCRange *p_range, uindex_t& r_first, uindex_t& r_chunk_count);
47+
bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, MCChunkCountCallback p_callback, void *p_context, MCRange *p_range, uindex_t& r_first, uindex_t& r_chunk_count);
5448

5549
bool MCChunkGetExtentsOfByteChunkByRangeInRange(MCDataRef p_data, MCRange *p_range, integer_t p_first, integer_t p_last, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count);
5650

libfoundation/src/foundation-chunk.cpp

Lines changed: 40 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -22,65 +22,57 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
2222

2323
////////////////////////////////////////////////////////////////////////////////
2424

25-
uinteger_t MCChunkCountByteChunkCallback(void *context)
25+
uinteger_t MCChunkCountByteChunkCallback(void *context, MCRange *p_range)
2626
{
27-
MCChunkCountInRangeState *t_state = static_cast<MCChunkCountInRangeState *>(context);
28-
2927
uinteger_t t_length;
30-
t_length = MCDataGetLength((MCDataRef)t_state -> value);
28+
t_length = MCDataGetLength(*(MCDataRef *)context);
3129

32-
if (t_state -> range == nil)
30+
if (p_range == nil)
3331
return t_length;
3432

3533
MCRange t_range;
36-
t_range = *t_state -> range;
34+
t_range = *p_range;
3735

3836
return t_range . offset + t_range . length > t_length ? t_length - t_range . offset : t_range . length;
3937
}
4038

41-
uinteger_t MCChunkCountCodeunitChunkCallback(void *context)
39+
uinteger_t MCChunkCountCodeunitChunkCallback(void *context, MCRange *p_range)
4240
{
43-
MCChunkCountInRangeState *t_state = static_cast<MCChunkCountInRangeState *>(context);
44-
4541
uinteger_t t_length;
46-
t_length = MCStringGetLength((MCStringRef)t_state -> value);
42+
t_length = MCStringGetLength(*(MCStringRef *)context);
4743

48-
if (t_state -> range == nil)
44+
if (p_range == nil)
4945
return t_length;
5046

5147
MCRange t_range;
52-
t_range = *t_state -> range;
48+
t_range = *p_range;
5349

5450
return t_range . offset + t_range . length > t_length ? t_length - t_range . offset : t_range . length;
5551
}
5652

57-
uinteger_t MCChunkCountGraphemeChunkCallback(void *context)
53+
uinteger_t MCChunkCountGraphemeChunkCallback(void *context, MCRange *p_range)
5854
{
59-
MCChunkCountInRangeState *t_state = static_cast<MCChunkCountInRangeState *>(context);
60-
6155
MCRange t_range;
62-
if (t_state -> range == nil)
63-
t_range = MCRangeMake(0, MCStringGetLength((MCStringRef)t_state -> value));
56+
if (p_range == nil)
57+
t_range = MCRangeMake(0, MCStringGetLength(*(MCStringRef *)context));
6458
else
65-
t_range = *t_state -> range;
59+
t_range = *p_range;
6660

6761
MCRange t_grapheme_range;
68-
MCStringUnmapGraphemeIndices((MCStringRef)t_state -> value, t_range, t_grapheme_range);
62+
MCStringUnmapGraphemeIndices(*(MCStringRef *)context, t_range, t_grapheme_range);
6963
return t_grapheme_range . length;
7064
}
7165

72-
uinteger_t MCChunkCountElementChunkCallback(void *context)
66+
uinteger_t MCChunkCountElementChunkCallback(void *context, MCRange *p_range)
7367
{
74-
MCChunkCountInRangeState *t_state = static_cast<MCChunkCountInRangeState *>(context);
75-
7668
uinteger_t t_length;
77-
t_length = MCProperListGetLength((MCProperListRef)t_state -> value);
69+
t_length = MCProperListGetLength(*(MCProperListRef *)context);
7870

79-
if (t_state -> range == nil)
71+
if (p_range == nil)
8072
return t_length;
8173

8274
MCRange t_range;
83-
t_range = *t_state -> range;
75+
t_range = *p_range;
8476

8577
return t_range . offset + t_range . length > t_length ? t_length - t_range . offset : t_range . length;
8678
}
@@ -90,7 +82,6 @@ struct MCChunkCountContext
9082
MCStringRef string;
9183
MCStringRef delimiter;
9284
MCStringOptions options;
93-
MCRange *range;
9485
};
9586

9687
static bool count_chunks(void *context, MCStringRef p_string, MCRange p_range)
@@ -102,12 +93,12 @@ static bool count_chunks(void *context, MCStringRef p_string, MCRange p_range)
10293
return true;
10394
}
10495

105-
uinteger_t MCChunkCountChunkChunkCallback(void *context)
96+
uinteger_t MCChunkCountChunkChunkCallback(void *context, MCRange *p_range)
10697
{
10798
MCChunkCountContext *t_state;
10899
t_state = (MCChunkCountContext *)context;
109100

110-
return MCChunkCountChunkChunksInRange(t_state -> string, t_state -> delimiter, t_state -> options, t_state -> range);
101+
return MCChunkCountChunkChunksInRange(t_state -> string, t_state -> delimiter, t_state -> options, p_range);
111102
}
112103

113104
////////////////////////////////////////////////////////////////////////////////
@@ -123,16 +114,16 @@ uindex_t MCChunkCountChunkChunksInRange(MCStringRef p_string, MCStringRef p_deli
123114
}
124115

125116
// AL-2015-02-10: [[ Bug 14532 ]] Allow chunk extents to be counted in a given range, to prevent substring copying in text chunk resolution.
126-
bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, integer_t p_last, MCChunkCountCallback p_callback, void *p_context, uindex_t& r_first, uindex_t& r_chunk_count)
117+
bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, integer_t p_last, MCChunkCountCallback p_callback, void *p_context, MCRange *p_range, uindex_t& r_first, uindex_t& r_chunk_count)
127118
{
128119
int32_t t_chunk_count;
129120
uinteger_t t_count;
130121
bool t_counted;
131122
t_counted = false;
132-
133-
if (p_first < 0 || p_last < 0)
123+
124+
if (p_first < 0 || p_last < 0 || p_range != nil)
134125
{
135-
t_count = p_callback(p_context);
126+
t_count = p_callback(p_context, p_range);
136127
t_counted = true;
137128

138129
if (p_first < 0)
@@ -142,6 +133,8 @@ bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool
142133

143134
if (p_last < 0)
144135
p_last += t_count + 1;
136+
else
137+
p_last = MCMin(p_last, t_count);
145138
}
146139
else
147140
p_first--;
@@ -163,7 +156,7 @@ bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool
163156
return false;
164157

165158
if (!t_counted)
166-
t_count = p_callback(p_context);
159+
t_count = p_callback(p_context, p_range);
167160

168161
// If the range extends beyond the number of chunks, the end index is out of range unless we are
169162
// looking for an end boundary, in which case it can exceed the end index by 1.
@@ -184,7 +177,7 @@ bool MCChunkGetExtentsByRangeInRange(bool p_strict, bool p_boundary_start, bool
184177

185178
// AL-2015-03-03: Add booleans to allow chunk ranges to be out of range by 1 in strict mode.
186179
// This is so that executing things like 'the offset of x after 0 in x' doesn't throw an error.
187-
bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, MCChunkCountCallback p_callback, void *p_context, uindex_t& r_first, uindex_t& r_chunk_count)
180+
bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start, bool p_boundary_end, integer_t p_first, MCChunkCountCallback p_callback, void *p_context, MCRange *p_range, uindex_t& r_first, uindex_t& r_chunk_count)
188181
{
189182
int32_t t_chunk_count;
190183
t_chunk_count = 1;
@@ -193,9 +186,9 @@ bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start,
193186
bool t_counted;
194187
t_counted = false;
195188

196-
if (p_first < 0)
189+
if (p_first < 0 || p_range != nil)
197190
{
198-
t_count = p_callback(p_context);
191+
t_count = p_callback(p_context, p_range);
199192
t_counted = true;
200193
p_first += t_count;
201194
}
@@ -210,7 +203,7 @@ bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start,
210203
return false;
211204

212205
if (!t_counted)
213-
t_count = p_callback(p_context);
206+
t_count = p_callback(p_context, p_range);
214207

215208
// If the range extends beyond the number of chunks, the end index is out of range unless we are
216209
// looking for an end boundary, in which case it can exceed the end index by 1.
@@ -233,72 +226,42 @@ bool MCChunkGetExtentsByExpressionInRange(bool p_strict, bool p_boundary_start,
233226

234227
bool MCChunkGetExtentsOfByteChunkByRangeInRange(MCDataRef p_data, MCRange *p_range, integer_t p_first, integer_t p_last, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
235228
{
236-
MCChunkCountInRangeState t_state;
237-
t_state . value = p_data;
238-
t_state . range = p_range;
239-
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountByteChunkCallback, &t_state, r_first, r_chunk_count);
229+
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountByteChunkCallback, &p_data, p_range, r_first, r_chunk_count);
240230
}
241231

242232
bool MCChunkGetExtentsOfByteChunkByExpressionInRange(MCDataRef p_data, MCRange *p_range, integer_t p_first, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
243233
{
244-
MCChunkCountInRangeState t_state;
245-
t_state . value = p_data;
246-
t_state . range = p_range;
247-
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountByteChunkCallback, &t_state, r_first, r_chunk_count);
234+
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountByteChunkCallback, &p_data, p_range, r_first, r_chunk_count);
248235
}
249236

250237
bool MCChunkGetExtentsOfCodeunitChunkByRangeInRange(MCStringRef p_string, MCRange *p_range, integer_t p_first, integer_t p_last, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
251238
{
252-
MCChunkCountInRangeState t_state;
253-
t_state . value = p_string;
254-
t_state . range = p_range;
255-
256-
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountCodeunitChunkCallback, &t_state, r_first, r_chunk_count);
239+
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountCodeunitChunkCallback, &p_string, p_range, r_first, r_chunk_count);
257240
}
258241

259242
bool MCChunkGetExtentsOfCodeunitChunkByExpressionInRange(MCStringRef p_string, MCRange *p_range, integer_t p_first, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
260243
{
261-
MCChunkCountInRangeState t_state;
262-
t_state . value = p_string;
263-
t_state . range = p_range;
264-
265-
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountCodeunitChunkCallback, &t_state, r_first, r_chunk_count);
244+
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountCodeunitChunkCallback, &p_string, p_range, r_first, r_chunk_count);
266245
}
267246

268247
bool MCChunkGetExtentsOfGraphemeChunkByRangeInRange(MCStringRef p_string, MCRange *p_range, integer_t p_first, integer_t p_last, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
269248
{
270-
MCChunkCountInRangeState t_state;
271-
t_state . value = p_string;
272-
t_state . range = p_range;
273-
274-
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountGraphemeChunkCallback, &t_state, r_first, r_chunk_count);
249+
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountGraphemeChunkCallback, &p_string, p_range, r_first, r_chunk_count);
275250
}
276251

277252
bool MCChunkGetExtentsOfGraphemeChunkByExpressionInRange(MCStringRef p_string, MCRange *p_range, integer_t p_first, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
278253
{
279-
MCChunkCountInRangeState t_state;
280-
t_state . value = p_string;
281-
t_state . range = p_range;
282-
283-
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountGraphemeChunkCallback, &t_state, r_first, r_chunk_count);
254+
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountGraphemeChunkCallback, &p_string, p_range, r_first, r_chunk_count);
284255
}
285256

286257
bool MCChunkGetExtentsOfElementChunkByRangeInRange(MCProperListRef p_list, MCRange *p_range, integer_t p_first, integer_t p_last, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
287258
{
288-
MCChunkCountInRangeState t_state;
289-
t_state . value = p_list;
290-
t_state . range = p_range;
291-
292-
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountElementChunkCallback, &t_state, r_first, r_chunk_count);
259+
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountElementChunkCallback, &p_list, p_range, r_first, r_chunk_count);
293260
}
294261

295262
bool MCChunkGetExtentsOfElementChunkByExpressionInRange(MCProperListRef p_list, MCRange *p_range, integer_t p_first, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
296263
{
297-
MCChunkCountInRangeState t_state;
298-
t_state . value = p_list;
299-
t_state . range = p_range;
300-
301-
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountElementChunkCallback, &t_state, r_first, r_chunk_count);
264+
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountElementChunkCallback, &p_list, p_range, r_first, r_chunk_count);
302265
}
303266

304267
bool MCChunkGetExtentsOfChunkChunkByRangeInRange(MCStringRef p_string, MCRange *p_range, MCStringRef p_delimiter, MCStringOptions p_options, integer_t p_first, integer_t p_last, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
@@ -307,9 +270,8 @@ bool MCChunkGetExtentsOfChunkChunkByRangeInRange(MCStringRef p_string, MCRange *
307270
t_state . string = p_string;
308271
t_state . delimiter = p_delimiter;
309272
t_state . options = p_options;
310-
t_state . range = p_range;
311273

312-
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountChunkChunkCallback, &t_state, r_first, r_chunk_count);
274+
return MCChunkGetExtentsByRangeInRange(p_strict, p_boundary_start, p_boundary_end, p_first, p_last, MCChunkCountChunkChunkCallback, &t_state, p_range, r_first, r_chunk_count);
313275
}
314276

315277
bool MCChunkGetExtentsOfChunkChunkByExpressionInRange(MCStringRef p_string, MCRange *p_range, MCStringRef p_delimiter, MCStringOptions p_options, integer_t p_first, bool p_strict, bool p_boundary_start, bool p_boundary_end, uindex_t& r_first, uindex_t& r_chunk_count)
@@ -318,9 +280,8 @@ bool MCChunkGetExtentsOfChunkChunkByExpressionInRange(MCStringRef p_string, MCRa
318280
t_ctxt . string = p_string;
319281
t_ctxt . delimiter = p_delimiter;
320282
t_ctxt . options = p_options;
321-
t_ctxt . range = p_range;
322283

323-
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountChunkChunkCallback, &t_ctxt, r_first, r_chunk_count);
284+
return MCChunkGetExtentsByExpressionInRange(p_strict, p_boundary_start, p_boundary_end, p_first, MCChunkCountChunkChunkCallback, &t_ctxt, p_range, r_first, r_chunk_count);
324285
}
325286

326287
////////////////////////////////////////////////////////////////////////////////
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
script "CoreChunksCompound"
2+
/*
3+
Copyright (C) 2016 LiveCode Ltd.
4+
5+
This file is part of LiveCode.
6+
7+
LiveCode is free software; you can redistribute it and/or modify it under
8+
the terms of the GNU General Public License v3 as published by the Free
9+
Software Foundation.
10+
11+
LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
12+
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
18+
19+
on TestBug17112
20+
local tLines
21+
put "a" & return & "b" into tLines
22+
TestAssert "char range of line overrun", char 1 to 100 of line 1 of tLines is "a"
23+
end TestBug17112

0 commit comments

Comments
 (0)