Add bin4.obf, fixed a bug in ovm.c

This commit is contained in:
Stefan Bühler 2009-06-28 10:16:44 +02:00
parent 1cb1296f40
commit df4f1f95cf
3 changed files with 9 additions and 2 deletions

View File

@ -31,6 +31,13 @@ ovm_t* ovm_load(const gchar *filename) {
exit(1); exit(1);
} }
if (0 != len % 12) {
fprintf (stderr, "file size of %s not a multiple of frame size\n", filename);
exit(1);
}
len /= 12;
oi = ovm->instructions; oi = ovm->instructions;
vi = ovm->values; vi = ovm->values;
for (cur = buf, i = 0; i < len; i++) { for (cur = buf, i = 0; i < len; i++) {

View File

@ -3,7 +3,7 @@ OVMJIT=../ovm/kdebuild/ovmjit
.SUFFIXES: .c .obf .o .SUFFIXES: .c .obf .o
FILES_OBF=bin1.obf bin2.obf bin3.obf FILES_OBF=bin1.obf bin2.obf bin3.obf bin4.obf
FILES_C=$(FILES_OBF:.obf=.c) FILES_C=$(FILES_OBF:.obf=.c)
.PHONY: all sources clean .PHONY: all sources clean
@ -11,7 +11,7 @@ FILES_C=$(FILES_OBF:.obf=.c)
all: sources all: sources
%.c: %.obf $(OVMJIT) %.c: %.obf $(OVMJIT)
@echo Creatin $@ from $< @echo Creating $@ from $<
@$(OVMJIT) $< $@ @$(OVMJIT) $< $@
sources: $(FILES_C) sources: $(FILES_C)

BIN
task/bin4.obf Normal file

Binary file not shown.