summaryrefslogtreecommitdiff
path: root/glsize.hpp
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-06-10 16:05:29 +0100
committerJosé Fonseca <jfonseca@vmware.com>2011-06-10 16:05:29 +0100
commit6faa6a1594ecb69902a4316fe90a9c65c7a21f48 (patch)
treee46be0a916007c5d3e9aa2d30da942096d5f77b2 /glsize.hpp
parent3c0e8ad508c3fc00662ef2eee14833fa60133333 (diff)
Fix nasty alignment bug in image size computation.
Diffstat (limited to 'glsize.hpp')
-rw-r--r--glsize.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/glsize.hpp b/glsize.hpp
index 777b430..1e91083 100644
--- a/glsize.hpp
+++ b/glsize.hpp
@@ -426,7 +426,7 @@ _is_pot(X x) {
template<class X, class Y>
static inline X
_align(X x, Y y) {
- return (x + (y - 1)) & (y - 1);
+ return (x + (y - 1)) & ~(y - 1);
}
static inline size_t