mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 16:22:41 +02:00
Avoid some potential UB in bgBuildTables
This commit is contained in:
1 parent
39c00dc465
commit
e3d77e8086
1 file changed
+4
-1
+4
-1
@@ -3251,7 +3251,10 @@ void bgBuildTables(s32 stagenum)
|
||||
inflatedsize = (inflatedsize | 0xf) + 1;
|
||||
|
||||
// Load and inflate section 3
|
||||
#if VERSION >= VERSION_NTSC_FINAL
|
||||
#ifdef AVOID_UB
|
||||
section3 = mempAlloc(inflatedsize + section3compsize, MEMPOOL_STAGE);
|
||||
scratch = section3 + inflatedsize;
|
||||
#elif VERSION >= VERSION_NTSC_FINAL
|
||||
section3 = mempAlloc(inflatedsize + 0x8000, MEMPOOL_STAGE);
|
||||
scratch = section3 + 0x8000;
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user