mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-31 10:16:01 +02:00
Corrected a problem with an uninitialized entry in ExtCurStyle that
could cause serious errors on systems that do not auto-zero allocated memory. Also: Fixed an error introduced by a recent commit to allocate character memory for efReadLine() which frees the memory before reading a .res.ext file, causing a crash when using "ext2spice" with the "extresist on" option.
This commit is contained in:
+10
-9
@@ -661,9 +661,6 @@ dbcUnconnectFunc(tile, clientData)
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* To do: Make the tpath entries dynamically allocated */
|
||||
#define FLATTERMSIZE 1024
|
||||
|
||||
int
|
||||
dbcConnectLabelFunc(scx, lab, tpath, csa2)
|
||||
SearchContext *scx;
|
||||
@@ -690,12 +687,16 @@ dbcConnectLabelFunc(scx, lab, tpath, csa2)
|
||||
|
||||
if (scx->scx_use != csa2->csa2_topscx->scx_use)
|
||||
{
|
||||
int newllen = tpath->tp_next - tpath->tp_first;
|
||||
newlabtext[0] = '\0';
|
||||
if (newllen > 0)
|
||||
strncpy(newlabtext, tpath->tp_first, newllen);
|
||||
sprintf(newlabtext + newllen, "%s", lab->lab_text);
|
||||
newlabptr = newlabtext;
|
||||
if (tpath)
|
||||
{
|
||||
int newllen = tpath->tp_next - tpath->tp_first;
|
||||
newlabtext[0] = '\0';
|
||||
if (newllen > 0)
|
||||
strncpy(newlabtext, tpath->tp_first, newllen);
|
||||
sprintf(newlabtext + newllen, "%s", lab->lab_text);
|
||||
newlabptr = newlabtext;
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
newlabptr = lab->lab_text;
|
||||
|
||||
@@ -651,6 +651,9 @@ typedef struct treeFilter
|
||||
#define TF_LABEL_ATTACH_NOT_SW 0x20 /* Same as above, ignore tile SW corner */
|
||||
#define TF_LABEL_ATTACH_CORNER 0x3C /* Mask of the four types above */
|
||||
|
||||
/* To do: Make the tpath entries dynamically allocated */
|
||||
#define FLATTERMSIZE 1024 /* Used for generating flattened labels */
|
||||
|
||||
/* -------------- Undo information passed to DBPaintPlane ------------- */
|
||||
|
||||
typedef struct
|
||||
|
||||
Reference in New Issue
Block a user