fix again, JP please check it. don't forget clear your cache!

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2177 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hyperiris 2009-02-09 15:41:28 +00:00
parent e4f1967674
commit 0868770d24
2 changed files with 28 additions and 13 deletions

View File

@ -43,20 +43,20 @@ bool IBannerLoader::CopyToStringAndCheck(std::string& _rDestination, const char*
}
// generate valid chars
for (unsigned char c = 0x20; c <= 0x80; c++)
for (int i = 0x20; i < 256; i++)
{
bValidChars[c] = true;
bValidChars[i] = true;
}
bValidChars[0x0a] = true;
bValidChars[0xa9] = true;
bValidChars[0xe9] = true;
//bValidChars[0xa9] = true;
//bValidChars[0xe9] = true;
bInitialized = true;
}
bool bResult = true;
char destBuffer[2048];
char destBuffer[2048] = {0};
char* dest = destBuffer;
const char* src = _src;

View File

@ -107,9 +107,17 @@ CBannerLoaderGC::GetName(std::string _rName[])
case CBannerLoaderGC::BANNER_BNR1:
{
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
char tempBuffer[33] = {0};
memcpy(tempBuffer, pBanner->comment.shortTitle, 32);
_rName[0] = tempBuffer;
char tempBuffer[65] = {0};
if (pBanner->comment.longTitle[0])
{
memcpy(tempBuffer, pBanner->comment.longTitle, 64);
}
else
{
memcpy(tempBuffer, pBanner->comment.shortTitle, 32);
}
CopyToStringAndCheck(_rName[0], tempBuffer);
returnCode = true;
}
break;
@ -120,9 +128,16 @@ CBannerLoaderGC::GetName(std::string _rName[])
u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
for (int i = 0; i < 6; i++)
{
char tempBuffer[33] = {0};
memcpy(tempBuffer, pBanner->comment[i].shortTitle, 32);
_rName[i] = tempBuffer;
char tempBuffer[65] = {0};
if (pBanner->comment[i].longTitle[0])
{
memcpy(tempBuffer, pBanner->comment[i].longTitle, 64);
}
else
{
memcpy(tempBuffer, pBanner->comment[i].shortTitle, 32);
}
CopyToStringAndCheck(_rName[i], tempBuffer);
}
returnCode = true;
@ -174,7 +189,7 @@ CBannerLoaderGC::GetDescription(std::string* _rDescription)
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
char tempBuffer[129] = {0};
memcpy(tempBuffer, pBanner->comment.comment, 128);
_rDescription[0] = tempBuffer;
CopyToStringAndCheck(_rDescription[0], tempBuffer);
returnCode = true;
}
break;
@ -186,7 +201,7 @@ CBannerLoaderGC::GetDescription(std::string* _rDescription)
{
char tempBuffer[129] = {0};
memcpy(tempBuffer, pBanner->comment[i].comment, 128);
_rDescription[i] = tempBuffer;
CopyToStringAndCheck(_rDescription[i], tempBuffer);
}
returnCode = true;
}