Fixing round_up, which was breaking physical alloc alignment.

This commit is contained in:
Ben Vanik 2014-10-27 23:34:17 -07:00
parent fe38598489
commit 40e6e661cb
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ T align(T value, T alignment) {
// Rounds the given number up to the next highest multiple.
template <typename T, typename V>
T round_up(T value, V multiple) {
return value + multiple - 1 - (value - 1) % multiple;
return value ? (value + multiple - 1 - (value - 1) % multiple) : multiple;
}
inline float saturate(float value) {