fix failing test

Unknown 2007-04-18 19:10:16 +02:00
parent dd8efc774c
commit f3a623dbbc
1 changed files with 5 additions and 3 deletions

View File

@ -59,8 +59,10 @@ TagRegistry::LookupUid (std::string uuid)
void
TagRegistry::PrettyPrint (uint32_t uid, uint8_t buf[Tags::SIZE], std::ostream &os)
{
NS_ASSERT (m_registry.size () > uid);
PrettyPrinter prettyPrinter = m_registry[uid].second;
NS_ASSERT (uid > 0);
uint32_t index = uid - 1;
NS_ASSERT (m_registry.size () > index);
PrettyPrinter prettyPrinter = m_registry[index].second;
if (prettyPrinter != 0)
{
prettyPrinter (buf, os);
@ -223,7 +225,7 @@ myTagCPrettyPrinterCb (struct myTagC const*c, std::ostream &os)
static void
myTagZPrettyPrinterCb (struct myTagZ const*z, std::ostream &os)
{
os << "struct myTagZ" << std::endl;
//os << "struct myTagZ" << std::endl;
}