]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
isint_w should use long literals 1391/head
authorMarc Espie <espie@nerim.net>
Thu, 4 Jun 2020 14:59:17 +0000 (16:59 +0200)
committerMarc Espie <espie@nerim.net>
Thu, 4 Jun 2020 14:59:17 +0000 (16:59 +0200)
cut&paste from isint apparently forgot that

libarchive/archive_acl.c

index 952e20df4dc01ac18e81382617c1b552710ed43a..41bb31f6ef13c6fb3901adbc0b187bf3e0bda355 100644 (file)
@@ -1402,14 +1402,14 @@ isint_w(const wchar_t *start, const wchar_t *end, int *result)
        if (start >= end)
                return (0);
        while (start < end) {
-               if (*start < '0' || *start > '9')
+               if (*start < L'0' || *start > L'9')
                        return (0);
                if (n > (INT_MAX / 10) ||
-                   (n == INT_MAX / 10 && (*start - '0') > INT_MAX % 10)) {
+                   (n == INT_MAX / 10 && (*start - L'0') > INT_MAX % 10)) {
                        n = INT_MAX;
                } else {
                        n *= 10;
-                       n += *start - '0';
+                       n += *start - L'0';
                }
                start++;
        }