powered by Jive Software

Var scope bug in org.jivesoftware.xiff.data.auth.SHA1

Scoping error with counter variable in SHA1 auth class

var “i” declared at line 108 is local to for loop - bitwise rightshift op & mod op at 112 reference it anyway. Flash IDE compiler ignores this, I guess by leaving the variable around after the loop. Strict compilation (MTASC) dies here.

current (line 108):

for (var i = 0; i < str.length; i++)

suggested fix (lines 108-9)

var i;

for (i = 0; i < str.length; i++)

Message was edited by: crushing

Message was edited by: crushing

Not a question - potential bug fix (minor)