Merge pull request #1926 from ether/fix/no-connect-to-corrupt-pad

Fix a whole range of bugs related to corrupted changesets
This commit is contained in:
Marcel Klehr 2013-10-10 11:07:37 -07:00
commit 22e9e5fdcd
2 changed files with 23 additions and 19 deletions

View file

@ -1504,6 +1504,7 @@ exports.moveOpsToNewPool = function (cs, oldPool, newPool) {
return upToDollar.replace(/\*([0-9a-z]+)/g, function (_, a) {
var oldNum = exports.parseNum(a);
var pair = oldPool.getAttrib(oldNum);
if(!pair) exports.error('Can\'t copy unknown attrib (reference attrib string to non-existant pool entry). Inconsistent attrib state!');
var newNum = newPool.putAttrib(pair);
return '*' + exports.numToString(newNum);
}) + fromDollar;