fix UB
This commit is contained in:
parent
81c284b7cf
commit
e4586e53ad
|
@ -1325,14 +1325,14 @@ static bool SupportedArchiveByMimetype(const QMimeType& mimetype)
|
||||||
|
|
||||||
static bool ZstdNdsRomByExtension(const QString& filename)
|
static bool ZstdNdsRomByExtension(const QString& filename)
|
||||||
{
|
{
|
||||||
if (filename.endsWith(".zst", Qt::CaseInsensitive))
|
return filename.endsWith(".zst", Qt::CaseInsensitive) &&
|
||||||
return NdsRomByExtension(filename.left(filename.size() - 4));
|
NdsRomByExtension(filename.left(filename.size() - 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ZstdGbaRomByExtension(const QString& filename)
|
static bool ZstdGbaRomByExtension(const QString& filename)
|
||||||
{
|
{
|
||||||
if (filename.endsWith(".zst", Qt::CaseInsensitive))
|
return filename.endsWith(".zst", Qt::CaseInsensitive) &&
|
||||||
return GbaRomByExtension(filename.left(filename.size() - 4));
|
GbaRomByExtension(filename.left(filename.size() - 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool FileIsSupportedFiletype(const QString& filename, bool insideArchive = false)
|
static bool FileIsSupportedFiletype(const QString& filename, bool insideArchive = false)
|
||||||
|
|
Loading…
Reference in New Issue