programmer-calculator icon indicating copy to clipboard operation
programmer-calculator copied to clipboard

`cb` consumes more than it should

Open selendym opened this issue 4 years ago • 0 comments

Hello.

Currently, the change number of bits command seems to break things, as it will consume every input that has the substring "cb" anywhere within it. This includes all hex numbers that match this, so numbers like 0xcb are impossible to input as regular numbers, though upper case does work.

The problem is most likely here: https://github.com/alt-romes/programmer-calculator/blob/060c9969170e78e9259e801b3bdfa548fdbbb504/src/main.c#L206

As an easy fix, the substring could be changed to something that doesn't clash with anything else, like "bits".

Best regards.

selendym avatar Nov 24 '21 18:11 selendym