More testcases work

This commit is contained in:
Dan Hirsch 2013-05-24 12:22:15 +02:00
parent c1b7d9307d
commit b9a33f2c98
7 changed files with 31 additions and 32 deletions

View file

@ -294,7 +294,7 @@ void h_rvm_patch_arg(HRVMProg *prog, uint16_t ip, uint16_t new_val) {
size_t h_svm_count_to_mark(HSVMContext *ctx) {
size_t ctm;
for (ctm = 0; ctm < ctx->stack_count-1; ctm++) {
for (ctm = 0; ctm < ctx->stack_count; ctm++) {
if (ctx->stack[ctx->stack_count - 1 - ctm]->token_type == TT_MARK)
return ctm;
}