From a36227cae9c9983faad42f98c3aa79c7a0d863a0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 11 May 2016 16:10:53 +0200 Subject: Work on the manual and zstr_length checks that the radix is valid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/zstr_length.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/zstr_length.c b/src/zstr_length.c index 16638e6..869dbc5 100644 --- a/src/zstr_length.c +++ b/src/zstr_length.c @@ -10,6 +10,8 @@ size_t zstr_length(z_t a, unsigned long long int radix) { size_t size_total = 1, size_temp; + if (radix < 2) + libzahl_failure(-ZERROR_INVALID_RADIX); zset(num, a); while (!zzero(num)) { zsetu(mag, radix); -- cgit v1.2.3-70-g09d2