diff options
author | Andy Wingo <wingo@pobox.com> | 2013-02-19 23:03:19 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-02-19 23:03:19 +0100 |
commit | e716f4410fb3f6c614def5a9b33a39185f637002 (patch) | |
tree | 211a98354169188d0a15984607caf4b4264368d4 /libguile/objcodes.c | |
parent | 5a4a4454c5302ed511eafde5a7759ebf00fbee17 (diff) | |
download | guile-e716f4410fb3f6c614def5a9b33a39185f637002.tar.gz |
fix an error message loading invalid bytecode
* libguile/objcodes.c (make_objcode_from_file): Add correct error
message if full_read failed without an errno.
Diffstat (limited to 'libguile/objcodes.c')
-rw-r--r-- | libguile/objcodes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/objcodes.c b/libguile/objcodes.c index a8515a7a2..e315f3e6e 100644 --- a/libguile/objcodes.c +++ b/libguile/objcodes.c @@ -220,7 +220,9 @@ make_objcode_from_file (int fd) int errno_save = errno; (void) close (fd); errno = errno_save; - SCM_SYSERROR; + if (errno) + SCM_SYSERROR; + scm_misc_error (FUNC_NAME, "file truncated while reading", SCM_EOL); } (void) close (fd); |