diff --git a/.dist/permissions.js b/.dist/permissions.js index 2e11163..0c4f19e 100644 --- a/.dist/permissions.js +++ b/.dist/permissions.js @@ -5,9 +5,15 @@ class Permissions { hasDeny; constructor(allow, deny = "") { this.hasDeny = !!deny; - console.log(allow,deny); - this.allow = BigInt(allow); - this.deny = BigInt(deny); + try { + this.allow = BigInt(allow); + this.deny = BigInt(deny); + } + catch (e) { + this.allow = 0n; + this.deny = 0n; + console.error(`Something really stupid happened with a permission with allow being ${allow} and deny being, ${deny}, execution will still happen, but something really stupid happened, please report if you know what caused this.`); + } } getPermissionbit(b, big) { return Boolean((big >> BigInt(b)) & 1n); diff --git a/webpage/permissions.ts b/webpage/permissions.ts index 3bce00f..af8841f 100644 --- a/webpage/permissions.ts +++ b/webpage/permissions.ts @@ -5,8 +5,14 @@ class Permissions{ readonly hasDeny:boolean; constructor(allow:string,deny:string=""){ this.hasDeny=!!deny; - this.allow=BigInt(allow); - this.deny=BigInt(deny); + try{ + this.allow = BigInt(allow); + this.deny = BigInt(deny); + }catch(e){ + this.allow = 0n; + this.deny = 0n; + console.error(`Something really stupid happened with a permission with allow being ${allow} and deny being, ${deny}, execution will still happen, but something really stupid happened, please report if you know what caused this.`) + } } getPermissionbit(b:number,big:bigint) : boolean{ return Boolean((big>>BigInt(b))&1n);