From d2b89eee76f52303c6d88ff04a2fcf030e5a9e2c Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 19 Nov 2010 15:20:42 -0800 Subject: fix for bug 6448 * fix leaf node value diff output. --- src/cnode/cnode-algorithm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp index 405ab4f..fa3912c 100644 --- a/src/cnode/cnode-algorithm.cpp +++ b/src/cnode/cnode-algorithm.cpp @@ -180,7 +180,7 @@ _diff_check_and_show_leaf(CfgNode *cfg1, CfgNode *cfg2, int level, // need to actually do a diff. // this follows the original perl logic. const vector& ovec = cfg1->getValues(); - const vector& nvec = cfg1->getValues(); + const vector& nvec = cfg2->getValues(); vector values; vector pfxs; Cstore::MapT nmap; @@ -217,9 +217,10 @@ _diff_check_and_show_leaf(CfgNode *cfg1, CfgNode *cfg2, int level, } else { // single-value node if (show_def || !cfg->isDefault()) { - const string& val = cfg->getValue(); + string val = cfg->getValue(); if (!force_pfx_diff) { const string& val1 = cfg1->getValue(); + val = cfg2->getValue(); if (val == val1) { force_pfx_diff = PFX_DIFF_NONE.c_str(); } else { -- cgit v1.2.3