diff options
author | Leo Uino <leo@norisys.jp> | 2011-07-15 14:20:41 +0900 |
---|---|---|
committer | Leo Uino <leo@norisys.jp> | 2011-07-15 14:20:41 +0900 |
commit | 4670274ec303082e0fb86ff3be1ea4170a17662f (patch) | |
tree | e51c1a8fe6cbc5ac04516337b9fce0a2f6aebd09 /lpg/libqr/code-parse.c | |
parent | 9f4843d686bca0d75bee174d8249fbf72527b94a (diff) | |
download | pdf-simple-sign-4670274ec303082e0fb86ff3be1ea4170a17662f.tar.gz pdf-simple-sign-4670274ec303082e0fb86ff3be1ea4170a17662f.tar.xz pdf-simple-sign-4670274ec303082e0fb86ff3be1ea4170a17662f.zip |
qr_mask_apply() works in-place
Diffstat (limited to 'lpg/libqr/code-parse.c')
-rw-r--r-- | lpg/libqr/code-parse.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lpg/libqr/code-parse.c b/lpg/libqr/code-parse.c index 29d96bb..7a98280 100644 --- a/lpg/libqr/code-parse.c +++ b/lpg/libqr/code-parse.c @@ -212,11 +212,9 @@ int qr_code_parse(const void * buffer, fprintf(stderr, "detected ec type %d; mask %d\n", ec, mask); - code.modules = qr_mask_apply(&src_bmp, mask); - if (code.modules == NULL) { - fprintf(stderr, "failed to apply mask\n"); - return -1; - } + code.modules = qr_bitmap_clone(&src_bmp); + /* XXX: check return */ + qr_mask_apply(code.modules, mask); qr_layout_init_mask(&code); |