abc2svg
Check-in [6f690f4f5c]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:core: fix: crash when no measure bar after a multi-measure rest
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1: 6f690f4f5c667643d0f33ca908737a9fe80ff6f0
User & Date: jef 2025-07-15 14:47:48.146
Context
2025-07-15
14:47
core: fix: crash when no measure bar after a multi-measure rest ... (Leaf check-in: 6f690f4f5c user: jef tags: trunk)
2025-07-14
13:29
core: fix: bad handling of fonts with many family names ... (check-in: 5e6ba73f82 user: jef tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to core/draw.js.
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
			n -= 2
			x += 6
		}
		if (n)
			xygl(x + 2, y, "r1")
	} // omrest()

	if (!s.next) {
		error(1, s, "Lack of bar after multi-measure rest")
		return
	}
	set_scale(s)

	prev = s		// search the start of the previous time sequence
	while (!prev.seqst)
		prev = prev.ts_prev
	prev = prev.ts_prev
	while (!prev.seqst)







<
<
<
<







1253
1254
1255
1256
1257
1258
1259




1260
1261
1262
1263
1264
1265
1266
			n -= 2
			x += 6
		}
		if (n)
			xygl(x + 2, y, "r1")
	} // omrest()





	set_scale(s)

	prev = s		// search the start of the previous time sequence
	while (!prev.seqst)
		prev = prev.ts_prev
	prev = prev.ts_prev
	while (!prev.seqst)
Changes to core/music.js.
2537
2538
2539
2540
2541
2542
2543
2544
2545


2546
2547
2548
2549
2550
2551
2552
	function mexp(s) {
	    var	bar, s3, s4, tim, nbar,
		nb = s.nmes,
		dur = s.dur / nb,
		s2 = s.next

		// get the bar (there may be some other symbols before the bar)
		while (!s2.bar_type)
			s2 = s2.next


		bar = s2
		while (!s2.bar_num)		// get the bar number
			s2 = s2.ts_prev
		nbar = s2.bar_num - s.nmes

		// change the multi-rest into a single rest
		s.type = C.REST







|

>
>







2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
	function mexp(s) {
	    var	bar, s3, s4, tim, nbar,
		nb = s.nmes,
		dur = s.dur / nb,
		s2 = s.next

		// get the bar (there may be some other symbols before the bar)
		while (s2 && !s2.bar_type)
			s2 = s2.next
		if (!s2)
			return error(1, s, "Lack of bar after multi-measure rest")
		bar = s2
		while (!s2.bar_num)		// get the bar number
			s2 = s2.ts_prev
		nbar = s2.bar_num - s.nmes

		// change the multi-rest into a single rest
		s.type = C.REST