From e794fc6a9fbc66f1bd4371bb2b670661049fc363 Mon Sep 17 00:00:00 2001 From: uellenberg Date: Sun, 2 May 2021 23:13:34 -0700 Subject: [PATCH] This is only meant for decimals --- package.json | 2 +- src/Num.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1f37586..538060d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decimalsystem", - "version": "1.0.4", + "version": "1.0.5", "description": "An experimental library for converting numbers to non-integer (decimal) bases.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/Num.ts b/src/Num.ts index 4bb8cf1..fe722a8 100644 --- a/src/Num.ts +++ b/src/Num.ts @@ -148,7 +148,7 @@ export class Num { continue; } - if(digitStr !== "0") { + if(digitStr !== "0" || digits.length < digitLog) { digits.push(...toAdd, digitStr); toAdd = []; }