Skip to content

Commit

Permalink
Fixed upper extension bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
effekseer committed Nov 13, 2017
1 parent e141775 commit 376349a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Binary file modified Dev/release/tools/fbxToEffekseerModelConverter.exe
Binary file not shown.
Binary file modified Dev/release/tools/mqoToEffekseerModelConverter.exe
Binary file not shown.
4 changes: 4 additions & 0 deletions Tool/fbxToEffekseerModelConverter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ int main(int argc, char** argv)
int ext_i = p.find_last_of(".");
std::string ext = p.substr(ext_i, p.size() - ext_i);

std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower);

if (ext != ".fbx")
{
printf("InputFile is not fbx\n");
Expand All @@ -59,6 +61,8 @@ int main(int argc, char** argv)
int ext_i = p.find_last_of(".");
std::string ext = p.substr(ext_i, p.size() - ext_i);

std::transform(ext.begin(), ext.end(), ext.begin(), tolower);

if (ext != ".efkmodel")
{
printf("OutputFile is not efkmodel\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ static void Main(string[] args)
if (items.Count >= 1)
{
var ext = Path.GetExtension(items[0]);
ext = ext.ToLower();
if (ext != ".mqo")
{
Console.WriteLine("InputFile is not mqo");
Expand All @@ -70,7 +71,8 @@ static void Main(string[] args)
if (items.Count >= 2)
{
var ext = Path.GetExtension(items[1]);
if (ext != ".efkmodel")
ext = ext.ToLower();
if (ext != ".efkmodel")
{
Console.WriteLine("OutputFile is not efkmodel");
return;
Expand Down

0 comments on commit 376349a

Please sign in to comment.