diff --git a/src/jrd/met.epp b/src/jrd/met.epp index f36254e384..04519598f7 100644 --- a/src/jrd/met.epp +++ b/src/jrd/met.epp @@ -37,7 +37,7 @@ * */ /* -$Id: met.epp,v 1.35 2002-11-16 18:48:01 skidder Exp $ +$Id: met.epp,v 1.36 2002-11-16 20:20:44 skidder Exp $ */ // This MUST be at the top of the file #ifdef DARWIN @@ -2003,6 +2003,7 @@ PRC MET_lookup_procedure(TDBB tdbb, SCHAR * name, BOOLEAN noscan) PRC procedure; vec::iterator ptr, end; VEC procedures; + SCHAR *p, *q; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -2011,14 +2012,19 @@ PRC MET_lookup_procedure(TDBB tdbb, SCHAR * name, BOOLEAN noscan) if ( (procedures = dbb->dbb_procedures) ) for (ptr = procedures->begin(), end = procedures->end(); - ptr < end; ptr++) { + ptr < end; ptr++) + { if ((procedure = PRC(*ptr))&& !(procedure->prc_flags & PRC_obsolete) && ((procedure->prc_flags & PRC_scanned) || noscan) && !(procedure->prc_flags & PRC_being_scanned) && !(procedure->prc_flags & PRC_being_altered) - && !(strcmp((SCHAR*)procedure->prc_name->str_data, (SCHAR*)name))) + && (p = (SCHAR*)procedure->prc_name->str_data)) { - return procedure; + for (q = name; *p == *q; p++, q++) + { + if (*p == 0) + return procedure; + } } }