diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-30 21:10:05 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-30 21:10:05 +0000 |
commit | a265a1e35d150033c504e3aef71c70b733cafa92 (patch) | |
tree | 6af1cfe416b20ff7ff04e0c05a73b55369c82f96 /src/core/SkTSort.h | |
parent | 1447aa3f3b9a4c23ac1fbc70c476828966980c9d (diff) |
SkNextLog2 requires values > 0.
git-svn-id: http://skia.googlecode.com/svn/trunk@7472 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkTSort.h')
-rw-r--r-- | src/core/SkTSort.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkTSort.h b/src/core/SkTSort.h index 8d4403c32c..0eeb0681be 100644 --- a/src/core/SkTSort.h +++ b/src/core/SkTSort.h @@ -192,7 +192,7 @@ template <typename T, typename C> void SkTIntroSort(int depth, T* left, T* right */ template <typename T, typename C> void SkTQSort(T* left, T* right, C lessThan) { ptrdiff_t size = right - left; - int depth = SkNextLog2(SkToU32(size)); + int depth = SkNextLog2(SkToU32(size + 1)); SkTIntroSort(depth * 2, left, right, lessThan); } |