summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2017-11-27 21:27:52 -0500
committerSolomon Peachy <pizza@shaftnet.org>2017-11-27 21:27:52 -0500
commit6438af89f806cb9f1127f6528595db49478fc6ae (patch)
treed5a5b816160ee0a52aa411311b336a1521af0a82
parent3b422a7b604384c57f8f5a76fe31ae22b6c4e699 (diff)
downloadselphy_print-6438af89f806cb9f1127f6528595db49478fc6ae.tar.gz
selphy_print-6438af89f806cb9f1127f6528595db49478fc6ae.tar.bz2
selphy_print-6438af89f806cb9f1127f6528595db49478fc6ae.zip
magicard: Fix the length computed when using composite black.
-rw-r--r--backend_magicard.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/backend_magicard.c b/backend_magicard.c
index d16bc3b..861da76 100644
--- a/backend_magicard.c
+++ b/backend_magicard.c
@@ -634,10 +634,11 @@ static int magicard_read_parse(void *vctx, int data_fd) {
out_y, out_m, out_c, out_k);
/* Pad out the length appropriately. */
- ctx->datalen += ((len_c * 6 / 8) * 3) + (len_c / 8) + 3 * 3;
+ ctx->datalen += ((len_c * 6 / 8) + 3) * 3;
- /* Terminate the K plane */
+ /* If there's a K plane, compute length.. */
if (out_k) {
+ ctx->datalen += (len_c / 8);
ctx->databuf[ctx->datalen++] = 0x1c;
ctx->databuf[ctx->datalen++] = 0x4b;
ctx->databuf[ctx->datalen++] = 0x3a;
@@ -738,7 +739,7 @@ static int magicard_cmdline_arg(void *vctx, int argc, char **argv)
struct dyesub_backend magicard_backend = {
.name = "Magicard family",
- .version = "0.05",
+ .version = "0.06",
.uri_prefix = "magicard",
.cmdline_arg = magicard_cmdline_arg,
.cmdline_usage = magicard_cmdline,