mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
polymer.c: Fix a potential zero-size calloc call when a two-walled sector
is present (like in E4L1). Also sneak in a trivial change in cache1d.c git-svn-id: https://svn.eduke32.com/eduke32@2010 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dc02ff5654
commit
843689f8a0
2 changed files with 3 additions and 3 deletions
|
@ -969,14 +969,14 @@ CACHE1D_FIND_REC *klistpath(const char *_path, const char *mask, int32_t type)
|
|||
|
||||
do
|
||||
{
|
||||
strcpy(buf, d);
|
||||
if (!pathsearchmode)
|
||||
{
|
||||
// Fix for "autoload" dir in multi-user environments - NY00123
|
||||
strcpy(buf, d);
|
||||
strcat(buf, path);
|
||||
if (*path) strcat(buf, "/");
|
||||
}
|
||||
else strcpy(buf, d);
|
||||
|
||||
dir = Bopendir(buf);
|
||||
if (dir)
|
||||
{
|
||||
|
|
|
@ -2448,7 +2448,7 @@ static int32_t polymer_buildfloor(int16_t sectnum)
|
|||
|
||||
if (s->floor.indices == NULL)
|
||||
{
|
||||
s->indicescount = (sec->wallnum - 2) * 3;
|
||||
s->indicescount = (max(3, sec->wallnum) - 2) * 3;
|
||||
s->floor.indices = Bcalloc(s->indicescount, sizeof(GLushort));
|
||||
s->ceil.indices = Bcalloc(s->indicescount, sizeof(GLushort));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue