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

Bug in public NurCmdLock(boolean secured, int passwd, int sBank, int sAddress, int sMaskBitLength, byte[] sMask, int memoryMask, int action, boolean raw) constructor #16

Open
KuznetsovS opened this issue Dec 3, 2019 · 0 comments

Comments

@KuznetsovS
Copy link

Begin code of the constructor is:
public NurCmdLock(boolean secured, int passwd, int sBank, int sAddress, int sMaskBitLength, byte[] sMask, int memoryMask, int action, boolean raw) throws NurApiException {
super(54, 0, 18 + sMaskBitLength);
if (action <= 3 && sMaskBitLength <= 255) {
this.mNoAccessPwd = !secured;
if (raw) {
this.mMemoryMask = memoryMask;
this.mAction = action;
} else {
...
in case of raw = true, action value should not be checked (action <= 3). Otherwise it causes wrong "Invalid parameter" exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant