don't assume sizeof(bool) == 8

This commit is contained in:
Joel Dice 2009-03-07 18:23:28 -07:00
parent e1395f300a
commit 8b0f7d790f

View File

@ -4327,8 +4327,9 @@ compile(MyThread* t, Allocator* allocator, Context* context)
PROTECT(t, eht);
unsigned visitCount = exceptionHandlerTableLength(t, eht);
bool visited[visitCount];
memset(visited, 0, visitCount);
memset(visited, 0, visitCount * sizeof(bool));
while (visitCount) {
bool progress = false;
@ -4339,7 +4340,7 @@ compile(MyThread* t, Allocator* allocator, Context* context)
ExceptionHandler* eh = exceptionHandlerTableBody(t, eht, i);
unsigned start = exceptionHandlerStart(eh);
if (not visited[i] and context->visitTable[start]) {
if ((not visited[i]) and context->visitTable[start]) {
-- visitCount;
visited[i] = true;
progress = true;