Use a string instead of an array!

pull/1732/head
Marcel Klehr 2013-04-11 21:23:38 +02:00
parent 49013b18c7
commit f4de7f6a90
1 changed files with 4 additions and 6 deletions

View File

@ -180,8 +180,8 @@ console.log(cs.ops)
while(iterator.hasNext()) { while(iterator.hasNext()) {
op = iterator.next() op = iterator.next()
if(op.opcode == '+') { if(op.opcode == '+') {
var newAttrs = [] var newAttrs = ''
console.log('\nold attribs', op.attribs)
op.attribs.split('*').forEach(function(attrNum) { op.attribs.split('*').forEach(function(attrNum) {
if(!attrNum) return if(!attrNum) return
attr = apool.getAttrib(attrNum) attr = apool.getAttrib(attrNum)
@ -191,15 +191,13 @@ console.log('\nold attribs', op.attribs)
}) })
op.attribs = newAttrs op.attribs = newAttrs
} }
console.log('new attribs', op.attribs)
assem.append(op) assem.append(op)
console.log('opstring', assem.toString())
} }
assem.endDocument(); assem.endDocument();
console.log(assem.toString()) console.log(assem.toString())
userChangeset = Changeset.pack(cs.oldLen, cs.newLen, assem.toString(), cs.charBank) userChangeset = Changeset.pack(cs.oldLen, cs.newLen, assem.toString(), cs.charBank)
Changeset.checkRep(userChangeset) Changeset.checkRep(userChangeset)
console.log(userChangeset) console.log(userChangeset)
} }
/* /*
// Make sure the actual author is the AuthorID // Make sure the actual author is the AuthorID