Opened 8 years ago

Closed 8 years ago

#9666 closed defect (fixed)

SCI: Hoyle5: crash due to kList w/Sort subop signature mismatch

Reported by: OmerMor Owned by: csnover
Priority: normal Component: Engine: SCI
Version: Keywords: sci32
Cc: Game:

Description

After starting a game of Hearts, the game will deal the cards and then crash due to mismatched kList/sort signature in Hand::sort().

The current signature is "ooo".
The expected signature appears to be "li(i)" which I guess stands for something like this:
List_Sort(List elements, int prop_to_sort_by, int order = 0);

Here's the decompiled script:

(method (sort param1)
   (if
      (and
         (not (Dealer script?))
         (or faceUp (and argc param1))
      )
      (switch gGNewStr_2AsInteger_8
         (1
            (List 22 (self elements?) 756 0)
         )
         (2
            (List 22 (self elements?) 756 1)
         )
         (3
            (self convertSuit: 3)
            (List 22 (self elements?) 756 0)
            (List 22 (self elements?) 755 0)
            (self revertSuit: 3)
         )
         (4
            (self convertSuit: 4)
            (List 22 (self elements?) 756 1)
            (List 22 (self elements?) 755 1)
            (self revertSuit: 4)
         )
         (5
            (List 22 self sortedList ascendingBySuitCode)
         )
         (6
            (List 22 self sortedList descendingBySuitCode)
         )
         (else  (self posn:) (return))
      )
      (self update: gCrazy8sSortCode)
   )
)

This bug can be reproduced using the Hoyle5 demo from here:
http://www.sierrahelp.com/Files/Demos/HoyleClassicGames5InteractiveDemo.zip.

Change History (2)

comment:1 by OmerMor, 8 years ago

Component: --Unset--Engine: SCI

comment:2 by csnover, 8 years ago

Keywords: sci32 added
Owner: set to csnover
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.