mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
Modified a routine to return a valid string when attempting to
generate a name for an instance that is set to NULL. It is not clear to me by an instance would have a NULL name, but apparently it can happen, and should not crash magic.
This commit is contained in:
@@ -391,6 +391,12 @@ dbGetUseName(celluse)
|
||||
ybuf[0] = '\0';
|
||||
|
||||
useID = celluse->cu_id;
|
||||
if (useID == NULL)
|
||||
{
|
||||
newID = (char *)mallocMagic(7);
|
||||
sprintf(newID, "(null)");
|
||||
return (newID);
|
||||
}
|
||||
newsize = strlen(useID) + 1;
|
||||
if (isx || isy)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user