diff --git a/tools/qfcc/source/obj_file.c b/tools/qfcc/source/obj_file.c index ce84d06c3..3d5f064c3 100644 --- a/tools/qfcc/source/obj_file.c +++ b/tools/qfcc/source/obj_file.c @@ -573,6 +573,13 @@ qfo_read (QFile *file) free (data); return 0; } + // qfprogs leaves progsversion as 0 + if (options.code.progsversion + && header->progs_version != options.code.progsversion) { + fprintf (stderr, "qfo file target VM does not match current target\n"); + free (data); + return 0; + } qfo = calloc (1, sizeof (qfo_t)); qfo->num_spaces = LittleLong (header->num_spaces); diff --git a/tools/qfcc/test/Makemodule.am b/tools/qfcc/test/Makemodule.am index 88b9e8480..f555e89f1 100644 --- a/tools/qfcc/test/Makemodule.am +++ b/tools/qfcc/test/Makemodule.am @@ -169,7 +169,7 @@ tools_qfcc_test_chewed_return_dat_SOURCES=tools/qfcc/test/chewed-return.r chewed_return_obj=$(tools_qfcc_test_chewed_return_dat_SOURCES:.r=.o) chewed_return_dep=$(call qcautodep,$(tools_qfcc_test_chewed_return_dat_SOURCES)) tools/qfcc/test/chewed-return.dat$(EXEEXT): $(chewed_return_obj) $(QFCC_DEP) - $(V_QFCCLD)$(QLINK) -o $@ $(chewed_return_obj) + $(V_QFCCLD)$(QLINK) -Ctarget=v6 -o $@ $(chewed_return_obj) tools/qfcc/test/chewed-return.run: $(qfcc_test_run_deps) @TEST_HARNESS_OPTS=--float $(top_srcdir)/tools/qfcc/test/build-run $@ include $(chewed_return_dep) # am--include-marker