draw: Avoid integer overflow converting pointers on 64bit archs.

Not really an error, as we only care for the lower 4 bits.
This commit is contained in:
José Fonseca 2008-12-30 20:10:24 +00:00
parent c789bd376f
commit 2f24bc6984

View file

@ -50,7 +50,7 @@ void draw_vs_set_constants( struct draw_context *draw,
const float (*constants)[4],
unsigned size )
{
if (((unsigned)constants) & 0xf) {
if (((uintptr_t)constants) & 0xf) {
if (size > draw->vs.const_storage_size) {
if (draw->vs.aligned_constant_storage)
align_free((void *)draw->vs.aligned_constant_storage);