Skip to content

Commit 3b0c78f

Browse files
pcaspersjenkins
authored andcommitted
QPR-12399 basic_string exception might be thrown here
1 parent 2957c21 commit 3b0c78f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

OREData/ored/portfolio/legdata.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ Leg makeYoYLeg(const LegData& data, const boost::shared_ptr<InflationIndex>& ind
18401840
boost::dynamic_pointer_cast<CapFlooredYoYLegEngineBuilder>(builder);
18411841
string indexname = yoyLegData->index();
18421842
boost::shared_ptr<InflationCouponPricer> couponPricer =
1843-
cappedFlooredYoYBuilder->engine(indexname.replace(indexname.find(" ", 0), 1, ""));
1843+
cappedFlooredYoYBuilder->engine(IndexNameTranslator::instance().oreName(indexname));
18441844

18451845
// set coupon pricer for the leg
18461846

@@ -1893,7 +1893,7 @@ Leg makeYoYLeg(const LegData& data, const boost::shared_ptr<InflationIndex>& ind
18931893
boost::dynamic_pointer_cast<CapFlooredNonStandardYoYLegEngineBuilder>(builder);
18941894
string indexname = zcIndex->name();
18951895
boost::shared_ptr<InflationCouponPricer> couponPricer =
1896-
cappedFlooredYoYBuilder->engine(indexname.replace(indexname.find(" ", 0), 1, ""));
1896+
cappedFlooredYoYBuilder->engine(IndexNameTranslator::instance().oreName(indexname));
18971897

18981898
// set coupon pricer for the leg
18991899

0 commit comments

Comments
 (0)