SkNextLog2 requires values > 0.

git-svn-id: http://skia.googlecode.com/svn/trunk@7472 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bungeman@google.com 2013-01-30 21:10:05 +00:00
parent 1447aa3f3b
commit a265a1e35d

View File

@ -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);
}