Carlos Myers wrote: > > > Mike Breuer wrote: > > > > > > ACMD(do_write) > > > { > > > struct obj_data *paper, *pen = NULL; > > > - char *papername, *penname; > > > + char papername[MAX_STRING_LENGTH], penname[MAX_STRING_LENGTH]; > > > > > > - papername = buf1; > > > - penname = buf2; > > > > > But two_arguments does not create a new string. It uses the existing > strings that were passed to it. So if you pass it a NULL, two_arguments > will reformat your harddrive, corrupt you BIOS and finally blow your house > up. Well maybe not, but you will get some sort of error. Ok.. It must be the beginning of a long weekend! I think Mike was right. But I think MAX_STRING_LENGTH is a little large for this purpose. Would not MAX_INPUT_LENGTH be better? -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST