@@ -11,7 +11,7 @@ import (
1111
1212var pspDirectoryTableDataChunk = []byte {
1313 0x24 , 0x50 , 0x53 , 0x50 ,
14- 0xcf , 0x55 , 0x73 , 0x1b ,
14+ 0x57 , 0x4d , 0x3f , 0xfc ,
1515 0x01 , 0x00 , 0x00 , 0x00 ,
1616 0x10 , 0x05 , 0x00 , 0x20 ,
1717
@@ -63,7 +63,8 @@ func TestFindPSPDirectoryTable(t *testing.T) {
6363}
6464
6565func TestPspDirectoryTableParsing (t * testing.T ) {
66- table , length , err := ParsePSPDirectoryTable (append (pspDirectoryTableDataChunk , 0xff ))
66+ data := append (pspDirectoryTableDataChunk , 0xff )
67+ table , length , err := ParsePSPDirectoryTable (data )
6768 if err != nil {
6869 t .Fatalf ("Failed to parse PSP Directory table, err: %v" , err )
6970 }
@@ -75,7 +76,10 @@ func TestPspDirectoryTableParsing(t *testing.T) {
7576 }
7677
7778 if table .PSPCookie != PSPDirectoryTableCookie {
78- t .Errorf ("BIOSCookie is incorrect: %d, expected: %d" , table .PSPCookie , PSPDirectoryTableCookie )
79+ t .Errorf ("PSPCookie is incorrect: %d, expected: %d" , table .PSPCookie , PSPDirectoryTableCookie )
80+ }
81+ if table .Checksum != 0xfc3f4d57 {
82+ t .Errorf ("Checksum is incorrect: %d, expected: %d" , table .Checksum , 0xfc3f4d57 )
7983 }
8084 if table .TotalEntries != 1 {
8185 t .Errorf ("TotalEntries is incorrect: %d, expected: %d" , table .TotalEntries , 1 )
0 commit comments