mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 10:57:07 +00:00
@@ -987,10 +987,12 @@ static int dm200encode_remainder(unsigned char target[], int target_length, cons
|
|||||||
switch (last_mode) {
|
switch (last_mode) {
|
||||||
case DM_C40:
|
case DM_C40:
|
||||||
case DM_TEXT:
|
case DM_TEXT:
|
||||||
if (symbols_left == process_p) // No unlatch required!
|
|
||||||
{
|
|
||||||
if (process_p == 1) // 1 data character left to encode.
|
if (process_p == 1) // 1 data character left to encode.
|
||||||
{
|
{
|
||||||
|
if (symbols_left > 1) {
|
||||||
|
target[target_length] = 254;
|
||||||
|
target_length++; // Unlatch and encode remaining data in ascii.
|
||||||
|
}
|
||||||
target[target_length] = source[inputlen - 1] + 1;
|
target[target_length] = source[inputlen - 1] + 1;
|
||||||
target_length++;
|
target_length++;
|
||||||
}
|
}
|
||||||
@@ -1003,19 +1005,8 @@ static int dm200encode_remainder(unsigned char target[], int target_length, cons
|
|||||||
target_length++;
|
target_length++;
|
||||||
target[target_length] = (unsigned char) (intValue % 256);
|
target[target_length] = (unsigned char) (intValue % 256);
|
||||||
target_length++;
|
target_length++;
|
||||||
}
|
if (symbols_left > 2) {
|
||||||
}
|
target[target_length] = 254; // Unlatch
|
||||||
|
|
||||||
if (symbols_left > process_p) {
|
|
||||||
target[target_length] = (254);
|
|
||||||
target_length++; // Unlatch and encode remaining data in ascii.
|
|
||||||
if (process_p == 1) {
|
|
||||||
target[target_length] = source[inputlen - 1] + 1;
|
|
||||||
target_length++;
|
|
||||||
} else if (process_p == 2) {
|
|
||||||
target[target_length] = source[inputlen - 2] + 1;
|
|
||||||
target_length++;
|
|
||||||
target[target_length] = source[inputlen - 1] + 1;
|
|
||||||
target_length++;
|
target_length++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user