Commit 7b179c2d authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(ccl_coding_driver): Setup ccl->last_block properly.

(setup_coding_system): Correctly setup `valid_codes' member.
parent 1814bd62
......@@ -3086,8 +3086,9 @@ setup_coding_system (coding_system, coding)
{
Lisp_Object this;
for (this = XCONS (val)->car; CONSP (val); val = XCONS (val)->cdr)
for (; CONSP (val); val = XCONS (val)->cdr)
{
this = XCONS (val)->car;
if (INTEGERP (this)
&& XINT (this) >= 0 && XINT (this) < 256)
coding->spec.ccl.valid_codes[XINT (this)] = 1;
......@@ -3606,6 +3607,9 @@ ccl_coding_driver (coding, source, destination, src_bytes, dst_bytes, encodep)
= encodep ? &coding->spec.ccl.encoder : &coding->spec.ccl.decoder;
int result;
if (encodep)
ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK;
coding->produced = ccl_driver (ccl, source, destination,
src_bytes, dst_bytes, &(coding->consumed));
if (encodep)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment