Bug 662649. DrawFPS: Make sure we use a 32 bit type instead of a 64 bit one. r=joe

This was causing badness on platforms where unsigned long is 64 bits.
This commit is contained in:
Jeff Muizelaar 2011-06-22 14:46:27 -04:00
parent e70b966d11
commit f15d555c8f

View File

@ -573,7 +573,8 @@ LayerManagerOGL::FPSState::DrawFPS(GLContext* context, CopyProgram* copyprog)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
unsigned long* buf = (unsigned long*)malloc(64 * 8 * 4);
// we rely on int being 32 bits
unsigned int* buf = (unsigned int*)malloc(64 * 8 * 4);
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 41; j++) {
buf[i * 64 + j] = (text[i * 41 + j] == 0) ? 0xfff000ff : 0xffffffff;