Merge pull request #3076 from unknownbrackets/ccc

Fix table checks in sceCcc.
This commit is contained in:
Henrik Rydgård 2013-08-07 00:26:00 -07:00
commit 6cc5e5507b
2 changed files with 3 additions and 8 deletions

View File

@ -115,7 +115,7 @@ int sceCccUTF8toSJIS(u32 dstAddr, int dstSize, u32 srcAddr)
ERROR_LOG(HLE, "sceCccUTF8toSJIS(%08x, %d, %08x): invalid pointers", dstAddr, dstSize, srcAddr);
return 0;
}
if (!jis2ucsTable.IsValid())
if (!ucs2jisTable.IsValid())
{
ERROR_LOG(HLE, "sceCccUTF8toSJIS(%08x, %d, %08x): table not loaded", dstAddr, dstSize, srcAddr);
return 0;
@ -144,11 +144,6 @@ int sceCccUTF16toUTF8(u32 dstAddr, int dstSize, u32 srcAddr)
ERROR_LOG(HLE, "sceCccUTF16toUTF8(%08x, %d, %08x): invalid pointers", dstAddr, dstSize, srcAddr);
return 0;
}
if (!jis2ucsTable.IsValid())
{
ERROR_LOG(HLE, "sceCccUTF16toUTF8(%08x, %d, %08x): table not loaded", dstAddr, dstSize, srcAddr);
return 0;
}
DEBUG_LOG(HLE, "sceCccUTF16toUTF8(%08x, %d, %08x)", dstAddr, dstSize, srcAddr);
UTF16LE utf(src);
@ -173,7 +168,7 @@ int sceCccUTF16toSJIS(u32 dstAddr, int dstSize, u32 srcAddr)
ERROR_LOG(HLE, "sceCccUTF16toSJIS(%08x, %d, %08x): invalid pointers", dstAddr, dstSize, srcAddr);
return 0;
}
if (!jis2ucsTable.IsValid())
if (!ucs2jisTable.IsValid())
{
ERROR_LOG(HLE, "sceCccUTF16toSJIS(%08x, %d, %08x): table not loaded", dstAddr, dstSize, srcAddr);
return 0;

View File

@ -617,7 +617,7 @@ int sceKernelPrintf(const char *formatString)
break;
case '0':
if (i + 3 >= n || format[i + 1] != '8' || format[i + 2] != 'x')
if (i + 3 > n || format[i + 1] != '8' || format[i + 2] != 'x')
supported = false;
else
{