diff options
author | Marc Laukien <marc@zeroc.com> | 2001-09-24 06:03:29 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-09-24 06:03:29 +0000 |
commit | 651299177638bb4928c1ade683709f0f171f5e18 (patch) | |
tree | 6c283b41a55b7af8bb39c738ea5cceb046608763 /cpp/src/Slice/Parser.cpp | |
parent | many fixes (diff) | |
download | ice-651299177638bb4928c1ade683709f0f171f5e18.tar.bz2 ice-651299177638bb4928c1ade683709f0f171f5e18.tar.xz ice-651299177638bb4928c1ade683709f0f171f5e18.zip |
fixes
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index a699ec2d73d..02340d845eb 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -554,8 +554,6 @@ Slice::Container::createNative(const string& name) TypeList Slice::Container::lookupType(const string& scoped, bool printError) { - assert(!scoped.empty()); - static const char* builtinTable[] = { "byte", @@ -588,9 +586,7 @@ Slice::Container::lookupType(const string& scoped, bool printError) TypeList Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError) { - assert(!scoped.empty()); - - if (scoped[0] == ':') + if (scoped.size() >= 2 && scoped[0] == ':') { return _unit->lookupTypeNoBuiltin(scoped.substr(2), printError); } @@ -644,9 +640,7 @@ Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError) ContainedList Slice::Container::lookupContained(const string& scoped, bool printError) { - assert(!scoped.empty()); - - if (scoped[0] == ':') + if (scoped.size() >= 2 && scoped[0] == ':') { return _unit->lookupContained(scoped.substr(2), printError); } |