diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 23:44:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 23:44:17 -0700 |
commit | 2142ccfc37db49b59ff7e4da47a59adb3a043615 (patch) | |
tree | 0c040e37d5cb7df69851f5eef0a5bfe611753363 /030container.cc | |
parent | 166e3c0d407a967d25d793b6a9db56ffd7a03727 (diff) | |
download | mu-2142ccfc37db49b59ff7e4da47a59adb3a043615.tar.gz |
2233 - basic checks for non-primitive recipes
This came last because we had to ensure all primitives are covered.
Diffstat (limited to '030container.cc')
-rw-r--r-- | 030container.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/030container.cc b/030container.cc index 89ba58de..8071ff4c 100644 --- a/030container.cc +++ b/030container.cc @@ -160,7 +160,7 @@ case GET: { } type_ordinal base_type = base.types.at(0); long long int offset = ingredients.at(1).at(0); - if (offset < 0 || offset >= SIZE(Type[base_type].elements)) break; + if (offset < 0 || offset >= SIZE(Type[base_type].elements)) break; // copied from Check above long long int src = base_address; for (long long int i = 0; i < offset; ++i) { src += size_of(Type[base_type].elements.at(i)); @@ -256,6 +256,7 @@ case GET_ADDRESS: { } type_ordinal base_type = base.types.at(0); long long int offset = ingredients.at(1).at(0); + if (offset < 0 || offset >= SIZE(Type[base_type].elements)) break; // copied from Check above long long int result = base_address; for (long long int i = 0; i < offset; ++i) { result += size_of(Type[base_type].elements.at(i)); @@ -505,6 +506,10 @@ void check_container_field_types() { MERGE, :(before "End Primitive Recipe Numbers") Recipe_ordinal["merge"] = MERGE; +:(before "End Primitive Recipe Checks") +case MERGE: { + break; +} :(before "End Primitive Recipe Implementations") case MERGE: { products.resize(1); |