aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler/asn1c_save.c
diff options
context:
space:
mode:
Diffstat (limited to 'libasn1compiler/asn1c_save.c')
-rw-r--r--libasn1compiler/asn1c_save.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index 0eb70c98..e0a2f671 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -353,7 +353,7 @@ real_copy(const char *src, const char *dst) {
while(!feof(fpsrc)) {
len = fread(buf, 1, sizeof(buf), fpsrc);
- if(fwrite(buf, 1, len, fpsrc) != len) {
+ if(fwrite(buf, 1, len, fpdst) != len) {
errno = EIO;
retval = -1;
break;