mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 09:46:17 -04:00
manual fixes
This commit is contained in:
parent
b33f73ac9a
commit
d05543db30
16 changed files with 57 additions and 37 deletions
|
@ -63,6 +63,7 @@ Ingredient.prototype.setValue = function(value) {
|
|||
* @param {string} type - The name of the data type.
|
||||
*/
|
||||
Ingredient.prepare = function(data, type) {
|
||||
let number;
|
||||
switch (type) {
|
||||
case "binaryString":
|
||||
case "binaryShortString":
|
||||
|
@ -76,7 +77,7 @@ Ingredient.prepare = function(data, type) {
|
|||
return data;
|
||||
}
|
||||
case "number":
|
||||
var number = parseFloat(data);
|
||||
number = parseFloat(data);
|
||||
if (isNaN(number)) {
|
||||
const sample = Utils.truncate(data.toString(), 10);
|
||||
throw "Invalid ingredient value. Not a number: " + sample;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue