aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorAndreas Schwab2009-05-02 11:32:42 +0000
committerAndreas Schwab2009-05-02 11:32:42 +0000
commit409ea3a1dd530feabeb8f7f21dfd9c4aa2eb7a43 (patch)
treecf47e5654ec7ee44dcd017c098847eca580067e5 /src/coding.c
parent36fc09321bce7286ce378c45382a0a4773d69a9d (diff)
downloademacs-409ea3a1dd530feabeb8f7f21dfd9c4aa2eb7a43.tar.gz
emacs-409ea3a1dd530feabeb8f7f21dfd9c4aa2eb7a43.zip
(record_conversion_result): Don't modify
Vlast_code_conversion_error for successful result. (alloc_destination): Don't clobber conversion result. (Bug#1650)
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index d374ca8b476..23690bc753b 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -992,6 +992,8 @@ record_conversion_result (struct coding_system *coding,
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 }
@@ -1203,7 +1205,6 @@ alloc_destination (coding, nbytes, dst)
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;