diff --git a/src/default.ts b/src/default.ts index 700a57e..34aab8b 100644 --- a/src/default.ts +++ b/src/default.ts @@ -26,7 +26,8 @@ export class DEFAULT { encodeBytes = 0; decode(buf, offset?) { - if (!offset) + /// catch range errors + if (!offset || offset < 0 || offset > 12) offset = 0; const answer = new Answer();