From f7753564cfab25ab8dda535b579d7e25b64413bf Mon Sep 17 00:00:00 2001 From: Harald Oehlmann Date: Mon, 3 Apr 2017 11:47:39 +0200 Subject: [PATCH] Codablock: Code A/B character set change corrected --- backend/codablock.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/backend/codablock.c b/backend/codablock.c index ab926434..34459675 100644 --- a/backend/codablock.c +++ b/backend/codablock.c @@ -305,7 +305,13 @@ int Columns2Rows(CharacterSetTable *T, unsigned char *data, int dataLength, emptyColumns=0; }else{ /* or ? */ - pSet[charCur]|=(T[charCur].BFollowing==1)?CShift:CodeB; + if (T[charCur].BFollowing==1) + { + pSet[charCur]|=CShift; + } else { + pSet[charCur]|=CodeB; + characterSetCur = CodeB; + } emptyColumns-=2; ++charCur; } @@ -324,7 +330,13 @@ int Columns2Rows(CharacterSetTable *T, unsigned char *data, int dataLength, emptyColumns=0; } else { /* or ? */ - pSet[charCur]|=(T[charCur].AFollowing==1)?CShift:CodeA; + if (T[charCur].AFollowing==1) + { + pSet[charCur]|=CShift; + } else { + pSet[charCur]|=CodeA; + characterSetCur = CodeA; + } emptyColumns-=2; ++charCur; }