From 63eed9d796847f4232776b871b1d0ddbac98dfc0 Mon Sep 17 00:00:00 2001 From: mkrsym1 Date: Thu, 17 Aug 2023 22:53:12 +0300 Subject: [PATCH] Handle missing txs section --- game_payload/src/tx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game_payload/src/tx.c b/game_payload/src/tx.c index e96e4ff..af88377 100644 --- a/game_payload/src/tx.c +++ b/game_payload/src/tx.c @@ -28,6 +28,10 @@ void tx_table_file(struct game_data *game, wchar_t *buf) { // Checksum the TXS section IMAGE_SECTION_HEADER *txsSection = pe_find_section(baseMap, game->txs_section_name); + if (!txsSection) { + msg_err_a("Could not find %s in %s. " ISSUE_SUFFIX, game->txs_section_name, game->base_module_name); + } + uint32_t txsChecksum = crc32c(0, baseMap + txsSection->PointerToRawData, txsSection->SizeOfRawData); // Format the path