Merge branch 'NetHack-3.6'
This commit is contained in:
17
src/pline.c
17
src/pline.c
@@ -572,4 +572,21 @@ VA_DECL(const char *, str)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* nhassert_failed is called when an nhassert's condition is false */
|
||||
void
|
||||
nhassert_failed(filepath, line)
|
||||
const char * filepath;
|
||||
int line;
|
||||
{
|
||||
const char * filename;
|
||||
|
||||
/* attempt to get filename from path. TODO: we really need a port provided
|
||||
* function to return a filename from a path */
|
||||
filename = strrchr(filepath, '/');
|
||||
filename = (filename == NULL ? strrchr(filepath, '\\') : filename);
|
||||
filename = (filename == NULL ? filepath : filename + 1);
|
||||
|
||||
impossible("nhassert failed in file '%s' at line %d", filename, line);
|
||||
}
|
||||
|
||||
/*pline.c*/
|
||||
|
||||
Reference in New Issue
Block a user