File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 47
47
struct .pack_into ("32s" , commentBuffer , 0x00 , sys .argv [3 ].encode ())
48
48
struct .pack_into ("32s" , commentBuffer , 0x20 , sys .argv [4 ].encode ())
49
49
50
+ # File info
51
+ fileInfoBuffer = ctypes .create_string_buffer (0x200 - 0x40 )
52
+ struct .pack_into (">L" , fileInfoBuffer , 0 , len (inputBuffer ))
53
+
54
+
50
55
# Pad to block boundary
51
- paddingLength = blockCount * 0x2000 - (len (bannerBuffer ) + len (iconBuffer ) + len (commentBuffer ) + len (inputBuffer ))
56
+ paddingLength = blockCount * 0x2000 - (len (bannerBuffer ) + len (iconBuffer ) + len (commentBuffer ) + len (fileInfoBuffer ) + len ( inputBuffer ))
52
57
paddingBuffer = ctypes .create_string_buffer (paddingLength )
53
58
54
59
outputFilename = os .path .splitext (os .path .splitext (inputFilename )[0 ])[0 ] + ".gci"
57
62
outputFile .write (bytearray (bannerBuffer ))
58
63
outputFile .write (bytearray (iconBuffer ))
59
64
outputFile .write (bytearray (commentBuffer ))
65
+ outputFile .write (bytearray (fileInfoBuffer ))
60
66
outputFile .write (bytearray (inputBuffer ))
61
67
outputFile .write (bytearray (paddingBuffer ))
62
68
outputFile .close ()
You can’t perform that action at this time.
0 commit comments