Added dynstr, fixed NULL pointer access

This commit is contained in:
Xavi Del Campo 2020-04-23 23:02:27 +02:00
parent 7ab44f41ca
commit aecaf18a95
4 changed files with 33 additions and 24 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "dynstr/dynstr"]
path = dynstr/dynstr
url = https://github.com/XaviDCR92/dynstr

1
dynstr/dynstr Submodule

@ -0,0 +1 @@
Subproject commit 357d4f2c0fc52ae7e5967f542161d59d09830e27

View File

@ -390,6 +390,11 @@ int PGXP_GetVertices(unsigned int* addr, void* pOutput, int xOffs, int yOffs)
// calculate offset to actual data
int offset = 0;
/* Dirty hack */
if (!pDMABlock)
return 0;
while ((pDMABlock[offset] != *addr) && (offset < blockSize))
{
unsigned char command = (unsigned char)((pDMABlock[offset] >> 24) & 0xff);