mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Fix error in vc9: don't index outside vector
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1512 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -213,7 +213,7 @@ ScriptValueP Context::dependencies(const Dependency& dep, const Script& script)
|
|||||||
}
|
}
|
||||||
// create jump record
|
// create jump record
|
||||||
Jump* jump = new Jump;
|
Jump* jump = new Jump;
|
||||||
jump->target = &script.instructions[i.data];
|
jump->target = &script.instructions[0] + i.data; // note: operator[] triggers assertion (in msvc>=9) failure if i.data==instructions.size()
|
||||||
assert(jump->target >= instr); // jumps must be forward
|
assert(jump->target >= instr); // jumps must be forward
|
||||||
jump->stack_top.assign(stack.begin() + stack_size, stack.end());
|
jump->stack_top.assign(stack.begin() + stack_size, stack.end());
|
||||||
getBindings(scope, jump->bindings);
|
getBindings(scope, jump->bindings);
|
||||||
|
|||||||
Reference in New Issue
Block a user