From 8addfdd0aa543cab2ef613931febdc8fd736e33c Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 15 Apr 2018 00:50:05 +0200 Subject: [PATCH] Reject .txth in txth parsing as CLI can try to play them --- src/meta/txth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/meta/txth.c b/src/meta/txth.c index 3923e08f..25a7a6bd 100644 --- a/src/meta/txth.c +++ b/src/meta/txth.c @@ -1,7 +1,6 @@ #include "meta.h" #include "../coding/coding.h" #include "../layout/layout.h" -#include "../util.h" #define TXT_LINE_MAX 0x2000 @@ -82,6 +81,11 @@ VGMSTREAM * init_vgmstream_txth(STREAMFILE *streamFile) { coding_t coding; int i, j; + + /* reject .txth as the CLI can open and decode with itself */ + if (check_extensions(streamFile, "txth")) + goto fail; + /* no need for ID or ext checks -- if a .TXTH exists all is good * (player still needs to accept the streamfile's ext, so at worst rename to .vgmstream) */ streamText = open_txth(streamFile);