diff options
author | Matthew Hoops | 2010-07-01 23:13:42 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-07-01 23:13:42 +0000 |
commit | 8b0f49b801afbef5ae2523078e82963c1120b3f5 (patch) | |
tree | 0197bc9c2985092f134b5ac01eb3a72db13246d0 /engines | |
parent | 4fabca98a58c0a11a056195107822dcbdea79d9e (diff) | |
download | scummvm-rg350-8b0f49b801afbef5ae2523078e82963c1120b3f5.tar.gz scummvm-rg350-8b0f49b801afbef5ae2523078e82963c1120b3f5.tar.bz2 scummvm-rg350-8b0f49b801afbef5ae2523078e82963c1120b3f5.zip |
Only print the ambiguous object notice in findObjectByName if we didn't specify an index.
svn-id: r50584
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 185a266203..135ad38792 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -300,14 +300,11 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) { if (result.empty()) return NULL_REG; - if (result.size() > 1) { + if (result.size() > 1 && index < 0) { printf("Ambiguous:\n"); for (i = 0; i < result.size(); i++) printf(" %3x: [%04x:%04x] %s\n", i, PRINT_REG(result[i]), name.c_str()); - if (index < 0) { - printf("Ambiguous: Aborting.\n"); - return NULL_REG; // Ambiguous - } + return NULL_REG; // Ambiguous } if (index < 0) |