summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mot-encoder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index 0d8d8d6..34adba5 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -1085,9 +1085,11 @@ void writeMotPAD(int output_fd,
}
else {
firstseg = 0;
- curseglen = MIN(non_ci_seglen,mscdgsize-i);
+ curseglen = non_ci_seglen;
}
+ curseglen = MIN(curseglen, mscdgsize - i);
+
if (firstseg == 1) {
// FF-PAD Byte L (CI=1)
pad[padlen-1] = 0x02;