I am getting a crash in medit save internally, which didn't seem to starnge to me because it has happened before in some kind of malloc call, but I was suprised to find it was crashing in a call to strlen() from a sprintf. I can't find anything wrong with this code, anyone else see anything I may have overlooked? gdb output: #0 0xef696dcc in strlen () #1 0xef6cae3c in _doprnt_unlocked () #2 0xef6cc178 in sprintf () #3 0x464fc in medit_parse (d=0x114a50, arg=0xeffff6b8 "y") at medit.c:590 #4 0x3ffe4 in nanny (d=0x114a50, arg=0xeffff6b8 "y") at interpreter.c:1440 #5 0x2e3e0 in game_loop (mother_desc=3) at comm.c:608 #6 0x2da28 in init_game (port=4111) at comm.c:244 #7 0x2d9ac in main (argc=4, argv=0xeffffd3c) at comm.c:214 code: case MEDIT_CONFIRM_SAVESTRING: /*. Ensure mob has MOB_ISNPC set or things will go pair shaped .*/ SET_BIT(MOB_FLAGS(OLC_MOB(d)), MOB_ISNPC); switch (*arg) { case 'y': case 'Y': /*. Save the mob in memory and to disk .*/ send_to_char("Saving mobile to memory.\r\n", d->character); medit_save_internally(d); sprintf(buf, "OLC: %s edits mob %d", <---line 590 GET_NAME(d->character), OLC_NUM(d)); mudlog(buf, CMP, LVL_BUILDER, TRUE); cleanup_olc(d, CLEANUP_ALL); return; case 'n': case 'N': cleanup_olc(d, CLEANUP_ALL); return; Chris +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST