From 5f0f0b48d791467ef0f99b74249ce6a5790e771b Mon Sep 17 00:00:00 2001 From: konn Date: Sun, 18 Jun 2006 10:02:21 +0000 Subject: [PATCH] * Writing is changed. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@985 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- src/chxj_qr_code.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chxj_qr_code.c b/src/chxj_qr_code.c index 24948826..0b9c5ecf 100644 --- a/src/chxj_qr_code.c +++ b/src/chxj_qr_code.c @@ -1357,13 +1357,15 @@ s_data_to_bin_num(qr_code_t* qrcode, int data_code_count) tmp[modn] = 0; int n = atoi(tmp); int bb = (modn == 1) ? 4 : 7; + for (jj=0; jj< bb; jj++) { tmp_bit[jj] = (n & 0x01) ? '1' : '0'; n = n >> 1; } + tmp_bit[(modn == 1) ? 4 : 7] = 0; - for (jj=bb -1; jj>=0; jj--) - { + + for (jj=bb -1; jj>=0; jj--) { result[kk++] = tmp_bit[jj]; } } -- 2.11.0