mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Blank BigNumber dishes are now treat as NaN instead of erroring
This commit is contained in:
parent
7992a540ae
commit
283d3e1e7b
2 changed files with 6 additions and 1 deletions
|
@ -194,7 +194,11 @@ Dish.prototype.translate = function(toType) {
|
|||
this.type = Dish.ARRAY_BUFFER;
|
||||
break;
|
||||
case Dish.BIG_NUMBER:
|
||||
this.value = new BigNumber(Utils.byteArrayToUtf8(this.value));
|
||||
try {
|
||||
this.value = new BigNumber(Utils.byteArrayToUtf8(this.value));
|
||||
} catch (err) {
|
||||
this.value = new BigNumber(NaN);
|
||||
}
|
||||
this.type = Dish.BIG_NUMBER;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue