| commit | f5fa53882fe3d463821a8c0932666fa1dcb6faa2 | [log] [tgz] |
|---|---|---|
| author | Marshall Clow <mclow.lists@gmail.com> | Thu Oct 31 17:23:08 2013 +0000 |
| committer | Marshall Clow <mclow.lists@gmail.com> | Thu Oct 31 17:23:08 2013 +0000 |
| tree | c194d30c583dc2a3b0d4d4f6c1711d3aecbfc0d0 | |
| parent | fb15ba68792edfc4dc8a954546e0d628d10f062f [diff] [blame] |
Fixes PR17148 llvm-svn: 193772
diff --git a/libcxx/include/string b/libcxx/include/string index c98e22f..234eb6b 100644 --- a/libcxx/include/string +++ b/libcxx/include/string
@@ -3047,9 +3047,9 @@ { size_type __m = __alloc_traits::max_size(__alloc()); #if _LIBCPP_BIG_ENDIAN - return (__m <= ~__long_mask ? __m : __m/2) - 1; + return (__m <= ~__long_mask ? __m : __m/2) - __alignment; #else - return __m - 1; + return __m - __alignment; #endif }