SCI: Improved the Table template a bit by taking advantage of C++ features

svn-id: r40190
This commit is contained in:
Max Horn 2009-04-28 22:56:44 +00:00
parent d62b4c62c4
commit ed914d6740
8 changed files with 71 additions and 143 deletions

View file

@ -2089,7 +2089,7 @@ Object *obj_get(EngineState *s, reg_t offset) {
if (memobj != NULL) {
if (memobj->type == MEM_OBJ_CLONES && ENTRY_IS_VALID(&memobj->data.clones, offset.offset))
obj = &(memobj->data.clones.table[offset.offset].entry);
obj = &(memobj->data.clones.table[offset.offset]);
else if (memobj->type == MEM_OBJ_SCRIPT) {
if (offset.offset <= memobj->data.script.buf_size && offset.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET
&& RAW_IS_OBJECT(memobj->data.script.buf + offset.offset)) {