diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-07-25 22:12:23 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-07-25 22:12:23 +0200 |
| commit | 835df7bd1e81852062dd70ce1a054fc9b510e50f (patch) | |
| tree | de418467fc318adfcf5e3fdd8e75ea2a055386c9 /src/util.c | |
| parent | Add ability to choose korn shell implementation (diff) | |
| download | blind-835df7bd1e81852062dd70ce1a054fc9b510e50f.tar.gz blind-835df7bd1e81852062dd70ce1a054fc9b510e50f.tar.bz2 blind-835df7bd1e81852062dd70ce1a054fc9b510e50f.tar.xz | |
Fix blind-kernel and blind-temporal-mean,d add blind-{spatial,temporal}-arithm and blind-spatial-mean, and add support for multiple streams in blind-arithm
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -32,6 +32,11 @@ tollu(const char *s, unsigned long long int min, unsigned long long int max, uns errno = ERANGE; return -1; } + if (!isdigit(s[*s == 'x' || *s == 'X' || *s == '#']) || + (*s == '0' && !isdigit(s[1 + (*s == 'x' || *s == 'o' || *s == 'b')]))) { + errno = EINVAL; + return -1; + } if (tolower(*s) == 'x' || *s == '#') *out = strtoull(s + 1, &end, 16); else if (*s == '0' && tolower(s[1]) == 'x') |
