aboutsummaryrefslogtreecommitdiff
path: root/src/cvt_xmi2mid.hpp
diff options
context:
space:
mode:
authorJP Cimalando <jpcima@users.noreply.github.com>2018-08-28 04:28:20 +0200
committerJP Cimalando <jpcima@users.noreply.github.com>2018-08-28 04:28:20 +0200
commit6c495486cdd3c3c8f5c3c945e79233128a7479f9 (patch)
tree250e05c7d507e4ade83c5ec38aa47f5e7b42c493 /src/cvt_xmi2mid.hpp
parent399992184883f76a0cd8909a92c15dea85dc657c (diff)
downloadlibADLMIDI-6c495486cdd3c3c8f5c3c945e79233128a7479f9.tar.gz
libADLMIDI-6c495486cdd3c3c8f5c3c945e79233128a7479f9.tar.bz2
libADLMIDI-6c495486cdd3c3c8f5c3c945e79233128a7479f9.zip
XMI: fix the VLQ reading procedure
Diffstat (limited to 'src/cvt_xmi2mid.hpp')
-rw-r--r--src/cvt_xmi2mid.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cvt_xmi2mid.hpp b/src/cvt_xmi2mid.hpp
index decb25c..e8d9dbf 100644
--- a/src/cvt_xmi2mid.hpp
+++ b/src/cvt_xmi2mid.hpp
@@ -640,7 +640,7 @@ static int xmi2mid_GetVLQ2(struct xmi2mid_xmi_ctx *ctx, uint32_t *quant) {
int32_t data;
*quant = 0;
- for (i = 0; i < 4; i++) {
+ for (i = 0; xmi2mid_getsrcpos(ctx) != xmi2mid_getsrcsize(ctx); ++i) {
data = xmi2mid_read1(ctx);
if (data & 0x80) {
xmi2mid_skipsrc(ctx, -1);