Merge fdfd8b38607bc032f61ce0367148c13bfba3ec11 into 4290ea753912378913b1f3f54e0fc5720afeda5d
This commit is contained in:
commit
47ee218bbe
@ -28,7 +28,7 @@ export function affineEncode(input, args) {
|
|||||||
b = args[1];
|
b = args[1];
|
||||||
let output = "";
|
let output = "";
|
||||||
|
|
||||||
if (!/^\+?(0|[1-9]\d*)$/.test(a) || !/^\+?(0|[1-9]\d*)$/.test(b)) {
|
if (!/^[+-]?(0|[1-9]\d*)$/.test(a) || !/^[+-]?(0|[1-9]\d*)$/.test(b)) {
|
||||||
throw new OperationError("The values of a and b can only be integers.");
|
throw new OperationError("The values of a and b can only be integers.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user