comparison src/coding.c @ 103133:2f7395806731

(record_conversion_result): Don't modify Vlast_code_conversion_error for successful result. (alloc_destination): Don't clobber conversion result. (Bug#1650)
author Andreas Schwab <schwab@linux-m68k.org>
date Sat, 02 May 2009 11:32:42 +0000
parents e68707cf48a5
children 3680b4fe0f79
comparison
equal deleted inserted replaced
103132:e1c910297520 103133:2f7395806731
990 Vlast_code_conversion_error = Qinterrupted; 990 Vlast_code_conversion_error = Qinterrupted;
991 break; 991 break;
992 case CODING_RESULT_INSUFFICIENT_MEM: 992 case CODING_RESULT_INSUFFICIENT_MEM:
993 Vlast_code_conversion_error = Qinsufficient_memory; 993 Vlast_code_conversion_error = Qinsufficient_memory;
994 break; 994 break;
995 case CODING_RESULT_SUCCESS:
996 break;
995 default: 997 default:
996 Vlast_code_conversion_error = intern ("Unknown error"); 998 Vlast_code_conversion_error = intern ("Unknown error");
997 } 999 }
998 } 1000 }
999 1001
1201 1203
1202 coding_alloc_by_making_gap (coding, dst - BUF_GPT_ADDR (buf), nbytes); 1204 coding_alloc_by_making_gap (coding, dst - BUF_GPT_ADDR (buf), nbytes);
1203 } 1205 }
1204 else 1206 else
1205 coding_alloc_by_realloc (coding, nbytes); 1207 coding_alloc_by_realloc (coding, nbytes);
1206 record_conversion_result (coding, CODING_RESULT_SUCCESS);
1207 coding_set_destination (coding); 1208 coding_set_destination (coding);
1208 dst = coding->destination + offset; 1209 dst = coding->destination + offset;
1209 return dst; 1210 return dst;
1210 } 1211 }
1211 1212