summaryrefslogtreecommitdiff
path: root/strings/apr_strings.c
diff options
context:
space:
mode:
authorGreg Ames <gregames@apache.org>2002-08-13 13:51:53 +0000
committerGreg Ames <gregames@apache.org>2002-08-13 13:51:53 +0000
commitb964179100586fe4b76a2cc2ea7012eb4714f537 (patch)
treed7e8299ad3d3d1a08c89894c44fccc860fcf3163 /strings/apr_strings.c
parent1e3e4de2744fa5297e4920a22071442e061fd9b2 (diff)
downloadapr-b964179100586fe4b76a2cc2ea7012eb4714f537.tar.gz
apr_strtoi64: off-by-one errors in the ebcdic test (i.e. 'I' - 'A' is 8).
It's much more straightforward to test APR_CHARSET_EBCDIC. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63807 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings/apr_strings.c')
-rw-r--r--strings/apr_strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/apr_strings.c b/strings/apr_strings.c
index 3ab08a671..8a19945c7 100644
--- a/strings/apr_strings.c
+++ b/strings/apr_strings.c
@@ -334,7 +334,7 @@ APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
c -= 'A' - 10;
else if (c >= 'a' && c <= 'z')
c -= 'a' - 10;
-#elif (('I' - 'A') == 9) && (('R' - 'J') == 9) && (('Z' - 'S') == 8)
+#elif APR_CHARSET_EBCDIC
else if (c >= 'A' && c <= 'I')
c -= 'A' - 10;
else if (c >= 'J' && c <= 'R')