diff options
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -863,10 +863,16 @@ static val read_file_common(val self, val stream, val error_stream, val compiled if (compiled && first) { val major = car(form); - if (neq(major, num_fast(6)) && neq(major, num_fast(7))) + val minor = cadr(form); + + if (lt(major, num_fast(6)) || gt(major, num_fast(8)) || + (major == num_fast(8) && minor != zero)) + { uw_throwf(error_s, lit("cannot load ~s: version number mismatch"), stream, nao); + } + big_endian = caddr(form); first = nil; version_form = form; |