Ticket #8554: simon-crash-amd64-fix.diff

File simon-crash-amd64-fix.diff, 588 bytes (added by SF/*anonymous, 18 years ago)

Patch file against Revision 23494

  • engines/simon/simon.cpp

     
    654654
    655655byte *SimonEngine::allocateItem(uint size) {
    656656        byte *org = _itemHeapPtr;
    657         size = (size + 3) & ~3;
     657        size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
    658658
    659659        _itemHeapPtr += size;
    660660        _itemHeapCurPos += size;
     
    727727}
    728728
    729729void SimonEngine::allocItemHeap() {
    730         _itemHeapSize = 10000;
     730        _itemHeapSize = 20000;
    731731        _itemHeapCurPos = 0;
    732         _itemHeapPtr = (byte *)calloc(10000, 1);
     732        _itemHeapPtr = (byte *)calloc(20000, 1);
    733733}
    734734
    735735void SimonEngine::allocTablesHeap() {