Reject .txth in txth parsing as CLI can try to play them

This commit is contained in:
bnnm 2018-04-15 00:50:05 +02:00
parent 56d6cbbf6c
commit 8addfdd0aa

View File

@ -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);