Merge branch 'pr782' into NetHack-3.7
This commit is contained in:
@@ -1812,6 +1812,7 @@ mdisplacem stoning and gloves had test backwards (pr #773 by entrez)
|
|||||||
writing type-named scrolls (pr #551 by entrez)
|
writing type-named scrolls (pr #551 by entrez)
|
||||||
more cases where newcham() gives messages (pr #775 by copperwater)
|
more cases where newcham() gives messages (pr #775 by copperwater)
|
||||||
lua fix contributed by ToxicFrog
|
lua fix contributed by ToxicFrog
|
||||||
|
fix memory leaks related to selection_new() (pr #782 by argrath)
|
||||||
|
|
||||||
|
|
||||||
Code Cleanup and Reorganization
|
Code Cleanup and Reorganization
|
||||||
|
|||||||
12
src/sp_lev.c
12
src/sp_lev.c
@@ -4369,11 +4369,13 @@ struct selectionvar *
|
|||||||
selection_filter_mapchar(struct selectionvar* ov, xchar typ, int lit)
|
selection_filter_mapchar(struct selectionvar* ov, xchar typ, int lit)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
struct selectionvar *ret = selection_new();
|
struct selectionvar *ret;
|
||||||
|
|
||||||
if (!ov || !ret)
|
if (!ov)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
ret = selection_new();
|
||||||
|
|
||||||
for (x = 1; x < ret->wid; x++)
|
for (x = 1; x < ret->wid; x++)
|
||||||
for (y = 0; y < ret->hei; y++)
|
for (y = 0; y < ret->hei; y++)
|
||||||
if (selection_getpoint(x, y, ov)
|
if (selection_getpoint(x, y, ov)
|
||||||
@@ -4452,11 +4454,13 @@ void
|
|||||||
selection_do_grow(struct selectionvar* ov, int dir)
|
selection_do_grow(struct selectionvar* ov, int dir)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
struct selectionvar *tmp = selection_new();
|
struct selectionvar *tmp;
|
||||||
|
|
||||||
if (!ov || !tmp)
|
if (!ov)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
tmp = selection_new();
|
||||||
|
|
||||||
if (dir == W_RANDOM)
|
if (dir == W_RANDOM)
|
||||||
dir = random_wdir();
|
dir = random_wdir();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user