]> sigrok.org Git - libsigrok.git/commitdiff
strutil: support special case in power of two calculation
authorGerhard Sittig <redacted>
Thu, 21 Dec 2023 20:20:55 +0000 (21:20 +0100)
committerGerhard Sittig <redacted>
Thu, 21 Dec 2023 20:34:24 +0000 (21:34 +0100)
The sr_next_power_of_two() helper routine rejected input value 0
(an index), considered this case invalid. It is not, requires 1 bit
to hold the value. Return a "power of two" value of 1 for that input,
callers expect that result.


No differences found