From 353c7dd46e4af4116a14ff64b0579aefea16250a Mon Sep 17 00:00:00 2001 From: yutaka Date: Thu, 26 Mar 2009 07:39:36 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=9B=E3=83=AF=E3=82=A4=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=82=B9=E7=94=A8=E3=83=90=E3=83=83=E3=83=95=E3=82=A1=E3=81=AF?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=B5=E3=82=A4=E3=82=BA?= =?UTF-8?q?=E3=82=92=E5=85=83=E3=81=AB=E3=81=99=E3=82=8B=E3=81=AE=E3=81=A7?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E5=80=A4=E5=88=B6=E9=99=90=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4(Alloc=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E9=99=90=E3=82=8AOK=E3=81=AB)=E3=80=81=20=E3=83=A1?= =?UTF-8?q?=E3=83=A2=E3=83=AA=E3=81=8C=E8=B6=B3=E3=82=8A=E3=81=AA=E3=81=84?= =?UTF-8?q?=E6=99=82=E3=81=AF=E3=80=81s=5Fdht.buffer=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=81=AA=E3=81=8F=E3=80=81p2work=E3=81=A7=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=8B=E3=81=A8=E3=80=81=20=E3=81=84?= =?UTF-8?q?=E3=82=84=E3=81=AA=E3=82=89=E5=9B=BA=E5=AE=9A=E5=80=A4Alloc?= =?UTF-8?q?=E3=81=AB=E6=88=BB=E3=81=97=E3=81=A6=E3=81=8F=E3=81=A0=E3=81=95?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2771 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/libraries_sysmenu/sysmenu/ARM9/src/title.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/build/libraries_sysmenu/sysmenu/ARM9/src/title.c b/build/libraries_sysmenu/sysmenu/ARM9/src/title.c index 75e20751..cc3eddc8 100644 --- a/build/libraries_sysmenu/sysmenu/ARM9/src/title.c +++ b/build/libraries_sysmenu/sysmenu/ARM9/src/title.c @@ -59,7 +59,6 @@ #endif #include -#define DS_HASH_TABLE_SIZE (512*1024) #define SYSM_TITLE_MESSAGE_ARRAY_MAX 1 @@ -257,18 +256,9 @@ static BOOL PrepareDHTDatabase(void) return FALSE; // cannot open the file } length = (int)FS_GetFileLength(&file); - if ( length > DS_HASH_TABLE_SIZE ) - { - OS_TPrintf("PrepareDHTDatabase failed: DHT file size (%d) is too large.\n", length ); - if(!s_b_dev) { - ERRORLOG_Printf( "WHITELIST_INITDB_FAILED (sub info): DHT file size (%d) is too large.\n", length ); - } - FS_CloseFile(&file); - return FALSE; // too large - } #if 0 // 1 if using attach_dummyromheader - if ( FS_SeekFile(&file, sizeof(ROM_Header), FS_SEEK_SET) ) + if ( !FS_SeekFile(&file, sizeof(ROM_Header), FS_SEEK_SET) ) { OS_TPrintf("PrepareDHTDatabase failed: DHT file size (%d) is too small.\n", length ); if(!s_b_dev) { @@ -279,6 +269,7 @@ static BOOL PrepareDHTDatabase(void) FS_CloseFile(&file); return FALSE; } + length -= sizeof(ROM_Header); #endif s_dht.buffer = SYSM_Alloc( (u32)length );