Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some serious bugs fixed #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/databr.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function QRCodeDataBlockReader(blocks, version, numErrorCorrectionCode)
var unicodeString = "";
do
{
intData = getNextBits(13);
intData = this.getNextBits(13);
var lowerByte = intData % 0xC0;
var higherByte = intData / 0xC0;

Expand Down
2 changes: 1 addition & 1 deletion src/findpat.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ function FinderPatternFinder()
if (this.hasSkipped)
{
// Found a third one
done = haveMultiplyConfirmedCenters();
done = this.haveMultiplyConfirmedCenters();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/formatinf.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function FormatInformation(formatInfo)
});
this.GetHashCode=function()
{
return (this.errorCorrectionLevel.ordinal() << 3) | dataMask;
return (this.errorCorrectionLevel.ordinal() << 3) | this.dataMask;
}
this.Equals=function( o)
{
Expand Down
2 changes: 1 addition & 1 deletion src/gf256.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function GF256( primitive)
}
if (coefficient == 0)
{
return zero;
return this.zero;
}
var coefficients = new Array(degree + 1);
for(var i=0;i<coefficients.length;i++)coefficients[i]=0;
Expand Down
2 changes: 1 addition & 1 deletion src/rsdecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function ReedSolomonDecoder(field)
if (numErrors == 1)
{
// shortcut
return new Array(errorLocator.getCoefficient(1));
return [ errorLocator.getCoefficient(1) ];
}
var result = new Array(numErrors);
var e = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function ECBlocks( ecCodewordsPerBlock, ecBlocks1, ecBlocks2)
{
this.ecCodewordsPerBlock = ecCodewordsPerBlock;
if(ecBlocks2)
this.ecBlocks = new Array(ecBlocks1, ecBlocks2);
this.ecBlocks = [ ecBlocks1, ecBlocks2 ];
else
this.ecBlocks = new Array(ecBlocks1);
this.ecBlocks = [ ecBlocks1 ];

this.__defineGetter__("ECCodewordsPerBlock", function()
{
Expand Down