splitobj() panic feedback
In case the splitobj() panic gets triggered again, provide some more info about why that has happened.
This commit is contained in:
@@ -458,8 +458,11 @@ splitobj(struct obj *obj, long num)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
/* can't split containers */
|
||||
if (obj->cobj || num <= 0L || obj->quan <= num)
|
||||
panic("splitobj"); /* can't split containers */
|
||||
panic("splitobj [cobj=%s num=%ld quan=%ld]",
|
||||
obj->cobj ? "non-empty container" : "(null)", num, obj->quan);
|
||||
|
||||
otmp = newobj();
|
||||
*otmp = *obj; /* copies whole structure */
|
||||
otmp->oextra = (struct oextra *) 0;
|
||||
|
||||
Reference in New Issue
Block a user