MCPcopy Create free account
hub / github.com/NetHack/NetHack / where_name

Function where_name

src/mkobj.c:3295–3309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3293};
3294
3295staticfn const char *
3296where_name(struct obj *obj)
3297{
3298 static char unknown[32]; /* big enough to handle rogue 64-bit int */
3299 int where;
3300
3301 if (!obj)
3302 return "nowhere";
3303 where = obj->where;
3304 if (where < 0 || where >= NOBJ_STATES || !obj_state_names[where]) {
3305 Sprintf(unknown, "unknown[%d]", where);
3306 return unknown;
3307 }
3308 return obj_state_names[where];
3309}
3310
3311DISABLE_WARNING_FORMAT_NONLITERAL
3312

Callers 2

objlist_sanityFunction · 0.85
insane_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected